![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include <cstddef>#include <cstdint>

Go to the source code of this file.
Macros | |
| #define | CLOSESOCKET close |
| #define | IN6_BLACKHOLE_SERVER_MODE_STR "100::556C:7472:4772:6453" |
| #define | IN6_MAX_ASCII_LEN 39 |
Functions | |
| bool | get_local_addresses (struct sockaddr_storage *addrs, size_t *len, int ip_version) |
| unsigned | get_sockaddr_addr_port (struct sockaddr *sa) |
| void | get_sockaddr_addr_str (struct sockaddr *sa, char *buf, size_t n) |
| const char * | get_sockaddr_str (struct sockaddr *sa) |
| bool | is_addr_linklocal (struct sockaddr *sa) |
| bool | is_addr_loopback (struct sockaddr *sa) |
| bool | is_addr_multicast (const char *addr) |
| bool | is_addr_private (struct sockaddr *sa) |
| bool | is_host_loopback (const char *hostname) |
| bool | is_host_private (const char *hostname) |
| bool | is_ipv6_supported (void) |
| uint16_t | socket_get_recv_port (int fd) |
| const char * | ug_gai_strerror (int errcode) |
Definition in file net.h.
| #define IN6_BLACKHOLE_SERVER_MODE_STR "100::556C:7472:4772:6453" |
Definition at line 52 of file net.h.
Referenced by adjust_params(), initialize_audio_network(), rtp_video_rxtx::initialize_network(), rtp_init_if(), and udp_is_server_mode_blackhole().
| #define IN6_MAX_ASCII_LEN 39 |
Definition at line 50 of file net.h.
Referenced by get_sockaddr_addr_str(), get_sockaddr_str(), and BasicRTSPOnlySubsession::startStream().
| bool get_local_addresses | ( | struct sockaddr_storage * | addrs, |
| size_t * | len, | ||
| int | ip_version ) |
Returns (in output parameter) list of local public IP addresses
Code was taken perhaps from: https://social.msdn.microsoft.com/Forums/en-US/3b6a92ac-93d3-4f59-a914-340c1ba41cff/how-to-retrieve-ip-addresses-of-the-network-cards-with-getadaptersaddresses
| [out] | addrs | storage allocate to copy the addresses |
| [in] | len | length of allocated space (in bytes) |
| [out] | len | length of returned addresses (in parameter addrs, in bytes) |
| ip_version | 6 for IPv6, 4 for IPv6, 0 both |
Definition at line 229 of file net.c.
References len, LOG_LEVEL_ERROR, log_msg(), and MSG.
Referenced by new_sdp().

| unsigned get_sockaddr_addr_port | ( | struct sockaddr * | sa | ) |
Definition at line 414 of file net.c.
Referenced by get_sockaddr_str(), and Participant_manager::tick().
| void get_sockaddr_addr_str | ( | struct sockaddr * | sa, |
| char * | buf, | ||
| size_t | n ) |
Definition at line 427 of file net.c.
References IN6_MAX_ASCII_LEN.
Referenced by get_sockaddr_str(), and Participant_manager::tick().
| const char * get_sockaddr_str | ( | struct sockaddr * | sa | ) |
Definition at line 450 of file net.c.
References get_sockaddr_addr_port(), get_sockaddr_addr_str(), and IN6_MAX_ASCII_LEN.
Referenced by rtp_process_data(), and Participant_manager::tick().

| bool is_addr_linklocal | ( | struct sockaddr * | sa | ) |
Definition at line 79 of file net.c.
References IPV4_LL_PREFIX.
Referenced by new_sdp().
| bool is_addr_loopback | ( | struct sockaddr * | sa | ) |
Definition at line 108 of file net.c.
References IN_LOOPBACKNET.
Referenced by control_thread(), is_host_loopback(), is_host_private(), and new_sdp().
| bool is_addr_multicast | ( | const char * | addr | ) |
Definition at line 382 of file net.c.
References is_addr4(), and is_addr6().
Referenced by udp_init_if().

| bool is_addr_private | ( | struct sockaddr * | sa | ) |
Definition at line 139 of file net.c.
Referenced by start_nat_traverse().
| bool is_host_loopback | ( | const char * | hostname | ) |
Definition at line 174 of file net.c.
References is_addr_loopback(), and resolve_host().
Referenced by adjust_params(), rtp_init_if(), start_nat_traverse(), and udp_init_if().

| bool is_host_private | ( | const char * | hostname | ) |
Definition at line 187 of file net.c.
References is_addr_loopback(), and resolve_host().
Referenced by start_nat_traverse().

| bool is_ipv6_supported | ( | void | ) |
Definition at line 402 of file net.c.
References closesocket, and INVALID_SOCKET.
Referenced by adjust_params().
| uint16_t socket_get_recv_port | ( | int | fd | ) |
Definition at line 200 of file net.c.
References len.
Referenced by control_start(), and process_messages().
| const char * ug_gai_strerror | ( | int | errcode | ) |
Definition at line 466 of file net.c.
References UNUSED.
Referenced by resolve_addrinfo(), resolve_host(), udp_host_addr6(), and udp_init_if().