master
h 24 lines 435 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_SOCKET_PEERS_H
4 #define NETDATA_SOCKET_PEERS_H
5
6 #ifndef INET6_ADDRSTRLEN
7 #define INET6_ADDRSTRLEN 46
8 #endif
9
10 typedef struct {
11 struct {
12 char ip[INET6_ADDRSTRLEN];
13 int port;
14 } local;
15
16 struct {
17 char ip[INET6_ADDRSTRLEN];
18 int port;
19 } peer;
20 } SOCKET_PEERS;
21
22 SOCKET_PEERS socket_peers(int sock_fd);
23
24 #endif //NETDATA_SOCKET_PEERS_H