Top |
Network interfaces discoveryNetwork interfaces discovery — Utility functions to discover local network interfaces |
gchar * | nice_interfaces_get_ip_for_interface () |
GList * | nice_interfaces_get_local_interfaces () |
GList * | nice_interfaces_get_local_ips () |
guint | nice_interfaces_get_if_index_by_addr () |
These utility functions allow the discovery of local network interfaces in a portable manner, they also allow finding the local ip addresses or the address allocated to a network interface.
gchar *
nice_interfaces_get_ip_for_interface (gchar *interface_name
);
Retrieves the IP address of an interface by its name. If this fails, NULL
is returned.
GList *
nice_interfaces_get_local_interfaces (void
);
Get the list of local interfaces
GList *
nice_interfaces_get_local_ips (gboolean include_loopback
);
Get a list of local ipv4 interface addresses
guint
nice_interfaces_get_if_index_by_addr (NiceAddress *addr
);
Returns the interface index match the local address passed. This can by used for APIs that need a specific address.
Since: 0.1.20