|
Instrument Neutral Distributed Interface INDI 2.2.5
|
Typedefs | |
| using | IF_ADDRS = ifaddrs * |
| using | IF_ADDRS_UNICAST = ifaddrs * |
Functions | |
| std::string | addressToString (struct sockaddr *addr, int sa_len) |
| void | freeAddresses (IF_ADDRS addrs) |
| auto | getAddresses (int family, IF_ADDRS *addrs) |
| auto | getSockAddr (IF_ADDRS_UNICAST addr) |
| int | getSockAddrLen (IF_ADDRS_UNICAST addr) |
| IF_ADDRS_UNICAST | getNextAddress (int family, IF_ADDRS_UNICAST addrs) |
| std::vector< std::string > | getInterfaceAddresses (int family) |
| std::vector< std::string > | getInterfaceAddressesV4 () |
| std::vector< std::string > | getInterfaceAddressesV6 () |
| std::vector< std::string > | getInterfaceAddressesAll () |
| using gmlc::netif::IF_ADDRS = typedef ifaddrs* |
| using gmlc::netif::IF_ADDRS_UNICAST = typedef ifaddrs* |
|
inline |
a helper function to convert the IP address in a sockaddr struct to text
| addr | a pointer to a sockaddr struct |
| sa_len | the length of the sockaddr (primarily for systems that don't support inet_ntop) |
|
inline |
|
inline |
a helper function to get a list of all interface adapters using OS system calls. the returned pointer from addrs must be freed with a call to freeAddresses.
| family | type of adapter addresses to get on Windows; one of AF_INET (IPv4), AF_INET6 (IPv6), or AF_UNSPEC (both) | |
| [out] | addrs | pointer to a pointer to be filled in with the address of the allocated address structure; must be freed when done by calling freeAddresses |
| std::vector< std::string > gmlc::netif::getInterfaceAddresses | ( | int | family | ) |
| std::vector< std::string > gmlc::netif::getInterfaceAddressesAll | ( | ) |
| std::vector< std::string > gmlc::netif::getInterfaceAddressesV4 | ( | ) |
| std::vector< std::string > gmlc::netif::getInterfaceAddressesV6 | ( | ) |
|
inline |
a helper function to get the next interface/adapter address based on OS
| family | specify the type of address desired on non-Windows systems; one of AF_INET (IPv4), AF_INET6 (IPv6), or AF_UNSPEC (both) |
| addrs | a pointer to an addresses structure for an interface/adapter list |
|
inline |
|
inline |