Kea  1.9.9-git
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 
14 namespace isc {
15 
16 namespace dhcp {
17 
19 struct SocketInfo {
20 
22  uint16_t port_;
23  uint16_t family_;
24 
26  int sockfd_;
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
int fallbackfd_
Fallback socket descriptor.
Definition: socket_info.h:50
int sockfd_
IPv4 or IPv6.
Definition: socket_info.h:26
isc::asiolink::IOAddress addr_
Definition: socket_info.h:21
uint16_t family_
socket port
Definition: socket_info.h:23
uint16_t port_
bound address
Definition: socket_info.h:22
Defines the logger used by the top-level component of kea-dhcp-ddns.
SocketInfo(const isc::asiolink::IOAddress &addr, const uint16_t port, const int sockfd, const int fallbackfd=-1)
SocketInfo constructor.
Definition: socket_info.h:58
Holds information about socket.
Definition: socket_info.h:19