Agora  1.2.0
Agora project
network_utils.h
Go to the documentation of this file.
1 
5 #ifndef NETWORK_UTILS_H_
6 #define NETWORK_UTILS_H_
7 
9 #include <netdb.h>
10 
11 #include <string>
12 
13 namespace agora_comm {
15 //Returns a local interface address in presentation format
16 std::string GetLocalAddressFromScope(size_t scope_id);
17 ::addrinfo* GetAddressInfo(const std::string& local_address,
18  const std::string& local_port);
19 void PrintAddressInfo(const ::addrinfo* print_info);
20 } // namespace agora_comm
21 
22 #endif // NETWORK_UTILS_H_
agora_comm::kDebugPrint
static constexpr bool kDebugPrint
Definition: network_utils.cc:24
fmt::v8::printf
auto printf(const S &fmt, const T &... args) -> int
Definition: printf.h:631
agora_comm::GetAddressInfo
::addrinfo * GetAddressInfo(const std::string &address, const std::string &port)
Definition: network_utils.cc:181
network_utils.h
Helper definations for networking.
AGORA_LOG_ERROR
#define AGORA_LOG_ERROR(...)
Definition: logger.h:39
AGORA_LOG_TRACE
#define AGORA_LOG_TRACE(...)
Definition: logger.h:92
u
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
agora_comm
For addr info.
Definition: network_utils.cc:22
agora_comm::GetLocalAddressFromScope
std::string GetLocalAddressFromScope(size_t scope_id)
Definition: network_utils.cc:143
agora_comm::ListLocalInterfaces
int ListLocalInterfaces()
Definition: network_utils.cc:28
agora_comm::kAllowedAiFamily
static constexpr int kAllowedAiFamily
Allow either - AF_INET6 | AF_INET.
Definition: network_utils.cc:26
agora_comm::PrintAddressInfo
void PrintAddressInfo(const ::addrinfo *print_info)
Definition: network_utils.cc:229