diff options
Diffstat (limited to 'docs/libnm/html/libnm-nm-utils.html')
| -rw-r--r-- | docs/libnm/html/libnm-nm-utils.html | 3392 |
1 files changed, 1992 insertions, 1400 deletions
diff --git a/docs/libnm/html/libnm-nm-utils.html b/docs/libnm/html/libnm-nm-utils.html index 4985188b..60eb603e 100644 --- a/docs/libnm/html/libnm-nm-utils.html +++ b/docs/libnm/html/libnm-nm-utils.html @@ -2,32 +2,27 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>nm-utils</title> +<title>libnm Reference Manual: nm-utils</title> <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="index.html" title="libnm Reference Manual"> <link rel="up" href="ch05.html" title="Utility API Reference"> <link rel="prev" href="ch05.html" title="Utility API Reference"> <link rel="next" href="libnm-nm-version.html" title="nm-version"> -<meta name="generator" content="GTK-Doc V1.19 (XML mode)"> +<meta name="generator" content="GTK-Doc V1.21 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> -<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> -<tr valign="middle"> -<td><a accesskey="p" href="ch05.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> -<td><a accesskey="u" href="ch05.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> -<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> -<th width="100%" align="center">libnm Reference Manual</th> -<td><a accesskey="n" href="libnm-nm-version.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> -</tr> -<tr><td colspan="5" class="shortcuts"> -<a href="#libnm-nm-utils.synopsis" class="shortcut">Top</a> - | - <a href="#libnm-nm-utils.description" class="shortcut">Description</a> - | - <a href="#libnm-nm-utils.object-hierarchy" class="shortcut">Object Hierarchy</a> -</td></tr> -</table> +<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> +<td width="100%" align="left" class="shortcuts"> +<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> + <a href="#libnm-nm-utils.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> + <a href="#libnm-nm-utils.object-hierarchy" class="shortcut">Object Hierarchy</a></span> +</td> +<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> +<td><a accesskey="u" href="ch05.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> +<td><a accesskey="p" href="ch05.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> +<td><a accesskey="n" href="libnm-nm-version.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> +</tr></table> <div class="refentry"> <a name="libnm-nm-utils"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> @@ -35,2008 +30,2605 @@ <h2><span class="refentrytitle"><a name="libnm-nm-utils.top_of_page"></a>nm-utils</span></h2> <p>nm-utils — Utility functions</p> </td> -<td valign="top" align="right"></td> +<td class="gallery_image" valign="top" align="right"></td> </tr></table></div> -<div class="refsynopsisdiv"> -<a name="libnm-nm-utils.synopsis"></a><h2>Synopsis</h2> -<a name="NMUtilsSecurityType"></a><pre class="synopsis"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-is-empty-ssid" title="nm_utils_is_empty_ssid ()">nm_utils_is_empty_ssid</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>); -const <span class="returnvalue">char</span> * <a class="link" href="libnm-nm-utils.html#nm-utils-escape-ssid" title="nm_utils_escape_ssid ()">nm_utils_escape_ssid</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-same-ssid" title="nm_utils_same_ssid ()">nm_utils_same_ssid</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid1</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len1</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid2</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len2</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> ignore_trailing_null</code></em>); -<span class="returnvalue">char</span> * <a class="link" href="libnm-nm-utils.html#nm-utils-ssid-to-utf8" title="nm_utils_ssid_to_utf8 ()">nm_utils_ssid_to_utf8</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>); -enum <a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType-enum" title="enum NMUtilsSecurityType">NMUtilsSecurityType</a>; -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-security-valid" title="nm_utils_security_valid ()">nm_utils_security_valid</a> (<em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NMDeviceWifiCapabilities"><span class="type">NMDeviceWifiCapabilities</span></a> wifi_caps</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> have_ap</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> adhoc</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApFlags"><span class="type">NM80211ApFlags</span></a> ap_flags</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApSecurityFlags"><span class="type">NM80211ApSecurityFlags</span></a> ap_wpa</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApSecurityFlags"><span class="type">NM80211ApSecurityFlags</span></a> ap_rsn</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-ap-mode-security-valid" title="nm_utils_ap_mode_security_valid ()">nm_utils_ap_mode_security_valid</a> (<em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NMDeviceWifiCapabilities"><span class="type">NMDeviceWifiCapabilities</span></a> wifi_caps</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-wep-key-valid" title="nm_utils_wep_key_valid ()">nm_utils_wep_key_valid</a> (<em class="parameter"><code>const <span class="type">char</span> *key</code></em>, - <em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType"><span class="type">NMWepKeyType</span></a> wep_type</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-wpa-psk-valid" title="nm_utils_wpa_psk_valid ()">nm_utils_wpa_psk_valid</a> (<em class="parameter"><code>const <span class="type">char</span> *psk</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip4-dns-to-variant" title="nm_utils_ip4_dns_to_variant ()">nm_utils_ip4_dns_to_variant</a> (<em class="parameter"><code><span class="type">char</span> **dns</code></em>); -<span class="returnvalue">char</span> ** <a class="link" href="libnm-nm-utils.html#nm-utils-ip4-dns-from-variant" title="nm_utils_ip4_dns_from_variant ()">nm_utils_ip4_dns_from_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip4-addresses-to-variant" title="nm_utils_ip4_addresses_to_variant ()">nm_utils_ip4_addresses_to_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *addresses</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *gateway</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip4-addresses-from-variant" title="nm_utils_ip4_addresses_from_variant ()">nm_utils_ip4_addresses_from_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>, - <em class="parameter"><code><span class="type">char</span> **out_gateway</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip4-routes-to-variant" title="nm_utils_ip4_routes_to_variant ()">nm_utils_ip4_routes_to_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *routes</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip4-routes-from-variant" title="nm_utils_ip4_routes_from_variant ()">nm_utils_ip4_routes_from_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-ip4-netmask-to-prefix" title="nm_utils_ip4_netmask_to_prefix ()">nm_utils_ip4_netmask_to_prefix</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> netmask</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-ip4-prefix-to-netmask" title="nm_utils_ip4_prefix_to_netmask ()">nm_utils_ip4_prefix_to_netmask</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> prefix</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-ip4-get-default-prefix" title="nm_utils_ip4_get_default_prefix ()">nm_utils_ip4_get_default_prefix</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> ip</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip6-dns-to-variant" title="nm_utils_ip6_dns_to_variant ()">nm_utils_ip6_dns_to_variant</a> (<em class="parameter"><code><span class="type">char</span> **dns</code></em>); -<span class="returnvalue">char</span> ** <a class="link" href="libnm-nm-utils.html#nm-utils-ip6-dns-from-variant" title="nm_utils_ip6_dns_from_variant ()">nm_utils_ip6_dns_from_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip6-addresses-to-variant" title="nm_utils_ip6_addresses_to_variant ()">nm_utils_ip6_addresses_to_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *addresses</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *gateway</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip6-addresses-from-variant" title="nm_utils_ip6_addresses_from_variant ()">nm_utils_ip6_addresses_from_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>, - <em class="parameter"><code><span class="type">char</span> **out_gateway</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip6-routes-to-variant" title="nm_utils_ip6_routes_to_variant ()">nm_utils_ip6_routes_to_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *routes</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip6-routes-from-variant" title="nm_utils_ip6_routes_from_variant ()">nm_utils_ip6_routes_from_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip-addresses-to-variant" title="nm_utils_ip_addresses_to_variant ()">nm_utils_ip_addresses_to_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *addresses</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip-addresses-from-variant" title="nm_utils_ip_addresses_from_variant ()">nm_utils_ip_addresses_from_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>, - <em class="parameter"><code><span class="type">int</span> family</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip-routes-to-variant" title="nm_utils_ip_routes_to_variant ()">nm_utils_ip_routes_to_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *routes</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-ip-routes-from-variant" title="nm_utils_ip_routes_from_variant ()">nm_utils_ip_routes_from_variant</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>, - <em class="parameter"><code><span class="type">int</span> family</code></em>); -<span class="returnvalue">char</span> * <a class="link" href="libnm-nm-utils.html#nm-utils-uuid-generate" title="nm_utils_uuid_generate ()">nm_utils_uuid_generate</a> (<em class="parameter"><code><span class="type">void</span></code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-file-is-certificate" title="nm_utils_file_is_certificate ()">nm_utils_file_is_certificate</a> (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-file-is-private-key" title="nm_utils_file_is_private_key ()">nm_utils_file_is_private_key</a> (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_encrypted</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-file-is-pkcs12" title="nm_utils_file_is_pkcs12 ()">nm_utils_file_is_pkcs12</a> (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (<a class="link" href="libnm-nm-utils.html#NMUtilsFileSearchInPathsPredicate" title="NMUtilsFileSearchInPathsPredicate ()">*NMUtilsFileSearchInPathsPredicate</a>) - (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>); -const <span class="returnvalue">char</span> * <a class="link" href="libnm-nm-utils.html#nm-utils-file-search-in-paths" title="nm_utils_file_search_in_paths ()">nm_utils_file_search_in_paths</a> (<em class="parameter"><code>const <span class="type">char</span> *progname</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *try_first</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *const *paths</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#GFileTest"><span class="type">GFileTest</span></a> file_test_flags</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsFileSearchInPathsPredicate" title="NMUtilsFileSearchInPathsPredicate ()"><span class="type">NMUtilsFileSearchInPathsPredicate</span></a> predicate</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-wifi-freq-to-channel" title="nm_utils_wifi_freq_to_channel ()">nm_utils_wifi_freq_to_channel</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> freq</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-wifi-channel-to-freq" title="nm_utils_wifi_channel_to_freq ()">nm_utils_wifi_channel_to_freq</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *band</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-wifi-find-next-channel" title="nm_utils_wifi_find_next_channel ()">nm_utils_wifi_find_next_channel</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>, - <em class="parameter"><code><span class="type">int</span> direction</code></em>, - <em class="parameter"><code><span class="type">char</span> *band</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-wifi-is-channel-valid" title="nm_utils_wifi_is_channel_valid ()">nm_utils_wifi_is_channel_valid</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *band</code></em>); -const <span class="returnvalue">char</span> * <a class="link" href="libnm-nm-utils.html#nm-utils-wifi-strength-bars" title="nm_utils_wifi_strength_bars ()">nm_utils_wifi_strength_bars</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> strength</code></em>); -#define <a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX">NM_UTILS_HWADDR_LEN_MAX</a> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-len" title="nm_utils_hwaddr_len ()">nm_utils_hwaddr_len</a> (<em class="parameter"><code><span class="type">int</span> type</code></em>); -<span class="returnvalue">char</span> * <a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-ntoa" title="nm_utils_hwaddr_ntoa ()">nm_utils_hwaddr_ntoa</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-atoba" title="nm_utils_hwaddr_atoba ()">nm_utils_hwaddr_atoba</a> (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()">nm_utils_hwaddr_aton</a> (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-valid" title="nm_utils_hwaddr_valid ()">nm_utils_hwaddr_valid</a> (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> length</code></em>); -<span class="returnvalue">char</span> * <a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-canonical" title="nm_utils_hwaddr_canonical ()">nm_utils_hwaddr_canonical</a> (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> length</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-matches" title="nm_utils_hwaddr_matches ()">nm_utils_hwaddr_matches</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> hwaddr1</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> hwaddr1_len</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> hwaddr2</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> hwaddr2_len</code></em>); -<span class="returnvalue">char</span> * <a class="link" href="libnm-nm-utils.html#nm-utils-bin2hexstr" title="nm_utils_bin2hexstr ()">nm_utils_bin2hexstr</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> src</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>, - <em class="parameter"><code><span class="type">int</span> final_len</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> * <a class="link" href="libnm-nm-utils.html#nm-utils-hexstr2bin" title="nm_utils_hexstr2bin ()">nm_utils_hexstr2bin</a> (<em class="parameter"><code>const <span class="type">char</span> *hex</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-iface-valid-name" title="nm_utils_iface_valid_name ()">nm_utils_iface_valid_name</a> (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-is-uuid" title="nm_utils_is_uuid ()">nm_utils_is_uuid</a> (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>); -#define <a class="link" href="libnm-nm-utils.html#NM-UTILS-INET-ADDRSTRLEN:CAPS" title="NM_UTILS_INET_ADDRSTRLEN">NM_UTILS_INET_ADDRSTRLEN</a> -const <span class="returnvalue">char</span> * <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()">nm_utils_inet4_ntop</a> (<em class="parameter"><code><span class="type">in_addr_t</span> inaddr</code></em>, - <em class="parameter"><code><span class="type">char</span> *dst</code></em>); -const <span class="returnvalue">char</span> * <a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()">nm_utils_inet6_ntop</a> (<em class="parameter"><code>const <span class="type">struct in6_addr</span> *in6addr</code></em>, - <em class="parameter"><code><span class="type">char</span> *dst</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-ipaddr-valid" title="nm_utils_ipaddr_valid ()">nm_utils_ipaddr_valid</a> (<em class="parameter"><code><span class="type">int</span> family</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *ip</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-nm-utils.html#nm-utils-check-virtual-device-compatibility" title="nm_utils_check_virtual_device_compatibility ()">nm_utils_check_virtual_device_compatibility</a> - (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> virtual_type</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> other_type</code></em>); -</pre> -</div> <div class="refsect1"> -<a name="libnm-nm-utils.object-hierarchy"></a><h2>Object Hierarchy</h2> -<pre class="synopsis"> - GEnum - +----NMUtilsSecurityType -</pre> -</div> -<div class="refsect1"> -<a name="libnm-nm-utils.description"></a><h2>Description</h2> -<p> -A collection of utility functions for working with SSIDs, IP addresses, Wi-Fi -access points and devices, among other things. -</p> -</div> -<div class="refsect1"> -<a name="libnm-nm-utils.details"></a><h2>Details</h2> -<div class="refsect2"> -<a name="nm-utils-is-empty-ssid"></a><h3>nm_utils_is_empty_ssid ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_is_empty_ssid (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>);</pre> -<p> -Different manufacturers use different mechanisms for not broadcasting the -AP's SSID. This function attempts to detect blank/empty SSIDs using a -number of known SSID-cloaking methods. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="libnm-nm-utils.functions"></a><h2>Functions</h2> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="functions_return"> +<col class="functions_name"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>ssid</code></em> :</span></p></td> -<td>pointer to a buffer containing the SSID data. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-is-empty-ssid" title="nm_utils_is_empty_ssid ()">nm_utils_is_empty_ssid</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> -<td>length of the SSID data in <em class="parameter"><code>ssid</code></em> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-escape-ssid" title="nm_utils_escape_ssid ()">nm_utils_escape_ssid</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the SSID is "empty", <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is not</td> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-same-ssid" title="nm_utils_same_ssid ()">nm_utils_same_ssid</a> <span class="c_punctuation">()</span> +</td> </tr> -</tbody> -</table></div> -</div> -<hr> -<div class="refsect2"> -<a name="nm-utils-escape-ssid"></a><h3>nm_utils_escape_ssid ()</h3> -<pre class="programlisting">const <span class="returnvalue">char</span> * nm_utils_escape_ssid (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>);</pre> -<p> -This function does a quick printable character conversion of the SSID, simply -replacing embedded NULLs and non-printable characters with the hexadecimal -representation of that character. Intended for debugging only, should not -be used for display of SSIDs. -</p> -<div class="variablelist"><table border="0" class="variablelist"> -<colgroup> -<col align="left" valign="top"> -<col> -</colgroup> -<tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>ssid</code></em> :</span></p></td> -<td>pointer to a buffer containing the SSID data. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span> +<td class="function_type"> +<span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ssid-to-utf8" title="nm_utils_ssid_to_utf8 ()">nm_utils_ssid_to_utf8</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> -<td>length of the SSID data in <em class="parameter"><code>ssid</code></em> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-security-valid" title="nm_utils_security_valid ()">nm_utils_security_valid</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>pointer to the escaped SSID, which uses an internal static buffer -and will be overwritten by subsequent calls to this function</td> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ap-mode-security-valid" title="nm_utils_ap_mode_security_valid ()">nm_utils_ap_mode_security_valid</a> <span class="c_punctuation">()</span> +</td> </tr> -</tbody> -</table></div> -</div> -<hr> -<div class="refsect2"> -<a name="nm-utils-same-ssid"></a><h3>nm_utils_same_ssid ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_same_ssid (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid1</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len1</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid2</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len2</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> ignore_trailing_null</code></em>);</pre> -<p> -Earlier versions of the Linux kernel added a NULL byte to the end of the -SSID to enable easy printing of the SSID on the console or in a terminal, -but this behavior was problematic (SSIDs are simply byte arrays, not strings) -and thus was changed. This function compensates for that behavior at the -cost of some compatibility with odd SSIDs that may legitimately have trailing -NULLs, even though that is functionally pointless. -</p> -<div class="variablelist"><table border="0" class="variablelist"> -<colgroup> -<col align="left" valign="top"> -<col> -</colgroup> -<tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>ssid1</code></em> :</span></p></td> -<td>the first SSID to compare. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len1]</span> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-wep-key-valid" title="nm_utils_wep_key_valid ()">nm_utils_wep_key_valid</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>len1</code></em> :</span></p></td> -<td>length of the SSID data in <em class="parameter"><code>ssid1</code></em> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-wpa-psk-valid" title="nm_utils_wpa_psk_valid ()">nm_utils_wpa_psk_valid</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>ssid2</code></em> :</span></p></td> -<td>the second SSID to compare. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len2]</span> +<td class="function_type"> +<span class="returnvalue">GVariant</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-dns-to-variant" title="nm_utils_ip4_dns_to_variant ()">nm_utils_ip4_dns_to_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>len2</code></em> :</span></p></td> -<td>length of the SSID data in <em class="parameter"><code>ssid2</code></em> +<td class="function_type"> +<span class="returnvalue">char</span> ** +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-dns-from-variant" title="nm_utils_ip4_dns_from_variant ()">nm_utils_ip4_dns_from_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>ignore_trailing_null</code></em> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to ignore one trailing NULL byte</td> +<td class="function_type"> +<span class="returnvalue">GVariant</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-addresses-to-variant" title="nm_utils_ip4_addresses_to_variant ()">nm_utils_ip4_addresses_to_variant</a> <span class="c_punctuation">()</span> +</td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the SSIDs are the same, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are not</td> +<td class="function_type"> +<span class="returnvalue">GPtrArray</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-addresses-from-variant" title="nm_utils_ip4_addresses_from_variant ()">nm_utils_ip4_addresses_from_variant</a> <span class="c_punctuation">()</span> +</td> </tr> -</tbody> -</table></div> -</div> -<hr> -<div class="refsect2"> -<a name="nm-utils-ssid-to-utf8"></a><h3>nm_utils_ssid_to_utf8 ()</h3> -<pre class="programlisting"><span class="returnvalue">char</span> * nm_utils_ssid_to_utf8 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *ssid</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>);</pre> -<p> -Wi-Fi SSIDs are byte arrays, they are _not_ strings. Thus, an SSID may -contain embedded NULLs and other unprintable characters. Often it is -useful to print the SSID out for debugging purposes, but that should be the -_only_ use of this function. Do not use this function for any persistent -storage of the SSID, since the printable SSID returned from this function -cannot be converted back into the real SSID of the access point. -</p> -<p> -This function does almost everything humanly possible to convert the input -into a printable UTF-8 string, using roughly the following procedure: -</p> -<p> -1) if the input data is already UTF-8 safe, no conversion is performed -2) attempts to get the current system language from the LANG environment - variable, and depending on the language, uses a table of alternative - encodings to try. For example, if LANG=hu_HU, the table may first try - the ISO-8859-2 encoding, and if that fails, try the Windows-1250 encoding. - If all fallback encodings fail, replaces non-UTF-8 characters with '?'. -3) If the system language was unable to be determined, falls back to the - ISO-8859-1 encoding, then to the Windows-1251 encoding. -4) If step 3 fails, replaces non-UTF-8 characters with '?'. -</p> -<p> -Again, this function should be used for debugging and display purposes -_only_. -</p> -<div class="variablelist"><table border="0" class="variablelist"> -<colgroup> -<col align="left" valign="top"> -<col> -</colgroup> -<tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>ssid</code></em> :</span></p></td> -<td>pointer to a buffer containing the SSID data. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span> +<td class="function_type"> +<span class="returnvalue">GVariant</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-routes-to-variant" title="nm_utils_ip4_routes_to_variant ()">nm_utils_ip4_routes_to_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> -<td>length of the SSID data in <em class="parameter"><code>ssid</code></em> +<td class="function_type"> +<span class="returnvalue">GPtrArray</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-routes-from-variant" title="nm_utils_ip4_routes_from_variant ()">nm_utils_ip4_routes_from_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>an allocated string containing a UTF-8 -representation of the SSID, which must be freed by the caller using <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. -Returns <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> on errors. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> +<td class="function_type"> +<span class="returnvalue">guint32</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-netmask-to-prefix" title="nm_utils_ip4_netmask_to_prefix ()">nm_utils_ip4_netmask_to_prefix</a> <span class="c_punctuation">()</span> </td> </tr> -</tbody> -</table></div> -</div> -<hr> -<div class="refsect2"> -<a name="NMUtilsSecurityType-enum"></a><h3>enum NMUtilsSecurityType</h3> -<pre class="programlisting">typedef enum { - NMU_SEC_INVALID = 0, - NMU_SEC_NONE, - NMU_SEC_STATIC_WEP, - NMU_SEC_LEAP, - NMU_SEC_DYNAMIC_WEP, - NMU_SEC_WPA_PSK, - NMU_SEC_WPA_ENTERPRISE, - NMU_SEC_WPA2_PSK, - NMU_SEC_WPA2_ENTERPRISE -} NMUtilsSecurityType; -</pre> -<p> -Describes generic security mechanisms that 802.11 access points may offer. -Used with <a class="link" href="libnm-nm-utils.html#nm-utils-security-valid" title="nm_utils_security_valid ()"><code class="function">nm_utils_security_valid()</code></a> for checking whether a given access -point is compatible with a network device. -</p> -<div class="variablelist"><table border="0" class="variablelist"> -<colgroup> -<col align="left" valign="top"> -<col> -</colgroup> -<tbody> <tr> -<td><p><a name="NMU-SEC-INVALID:CAPS"></a><span class="term"><code class="literal">NMU_SEC_INVALID</code></span></p></td> -<td>unknown or invalid security, placeholder and not used +<td class="function_type"> +<span class="returnvalue">guint32</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-prefix-to-netmask" title="nm_utils_ip4_prefix_to_netmask ()">nm_utils_ip4_prefix_to_netmask</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><a name="NMU-SEC-NONE:CAPS"></a><span class="term"><code class="literal">NMU_SEC_NONE</code></span></p></td> -<td>unencrypted and open +<td class="function_type"> +<span class="returnvalue">guint32</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip4-get-default-prefix" title="nm_utils_ip4_get_default_prefix ()">nm_utils_ip4_get_default_prefix</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><a name="NMU-SEC-STATIC-WEP:CAPS"></a><span class="term"><code class="literal">NMU_SEC_STATIC_WEP</code></span></p></td> -<td>static WEP keys are used for encryption +<td class="function_type"> +<span class="returnvalue">GVariant</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-dns-to-variant" title="nm_utils_ip6_dns_to_variant ()">nm_utils_ip6_dns_to_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><a name="NMU-SEC-LEAP:CAPS"></a><span class="term"><code class="literal">NMU_SEC_LEAP</code></span></p></td> -<td>Cisco LEAP is used for authentication and for generating the -dynamic WEP keys automatically +<td class="function_type"> +<span class="returnvalue">char</span> ** +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-dns-from-variant" title="nm_utils_ip6_dns_from_variant ()">nm_utils_ip6_dns_from_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><a name="NMU-SEC-DYNAMIC-WEP:CAPS"></a><span class="term"><code class="literal">NMU_SEC_DYNAMIC_WEP</code></span></p></td> -<td>standard 802.1x is used for authentication and -generating the dynamic WEP keys automatically +<td class="function_type"> +<span class="returnvalue">GVariant</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-addresses-to-variant" title="nm_utils_ip6_addresses_to_variant ()">nm_utils_ip6_addresses_to_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><a name="NMU-SEC-WPA-PSK:CAPS"></a><span class="term"><code class="literal">NMU_SEC_WPA_PSK</code></span></p></td> -<td>WPA1 is used with Pre-Shared Keys (PSK) +<td class="function_type"> +<span class="returnvalue">GPtrArray</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-addresses-from-variant" title="nm_utils_ip6_addresses_from_variant ()">nm_utils_ip6_addresses_from_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><a name="NMU-SEC-WPA-ENTERPRISE:CAPS"></a><span class="term"><code class="literal">NMU_SEC_WPA_ENTERPRISE</code></span></p></td> -<td>WPA1 is used with 802.1x authentication +<td class="function_type"> +<span class="returnvalue">GVariant</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-routes-to-variant" title="nm_utils_ip6_routes_to_variant ()">nm_utils_ip6_routes_to_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><a name="NMU-SEC-WPA2-PSK:CAPS"></a><span class="term"><code class="literal">NMU_SEC_WPA2_PSK</code></span></p></td> -<td>WPA2/RSN is used with Pre-Shared Keys (PSK) +<td class="function_type"> +<span class="returnvalue">GPtrArray</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip6-routes-from-variant" title="nm_utils_ip6_routes_from_variant ()">nm_utils_ip6_routes_from_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><a name="NMU-SEC-WPA2-ENTERPRISE:CAPS"></a><span class="term"><code class="literal">NMU_SEC_WPA2_ENTERPRISE</code></span></p></td> -<td>WPA2 is used with 802.1x authentication +<td class="function_type"> +<span class="returnvalue">GVariant</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip-addresses-to-variant" title="nm_utils_ip_addresses_to_variant ()">nm_utils_ip_addresses_to_variant</a> <span class="c_punctuation">()</span> </td> </tr> -</tbody> -</table></div> -</div> -<hr> -<div class="refsect2"> -<a name="nm-utils-security-valid"></a><h3>nm_utils_security_valid ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_security_valid (<em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NMDeviceWifiCapabilities"><span class="type">NMDeviceWifiCapabilities</span></a> wifi_caps</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> have_ap</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> adhoc</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApFlags"><span class="type">NM80211ApFlags</span></a> ap_flags</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApSecurityFlags"><span class="type">NM80211ApSecurityFlags</span></a> ap_wpa</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApSecurityFlags"><span class="type">NM80211ApSecurityFlags</span></a> ap_rsn</code></em>);</pre> -<p> -Given a set of device capabilities, and a desired security type to check -against, determines whether the combination of device, desired security -type, and AP capabilities intersect. -</p> -<p> -NOTE: this function cannot handle checking security for AP/Hotspot mode; -use <a class="link" href="libnm-nm-utils.html#nm-utils-ap-mode-security-valid" title="nm_utils_ap_mode_security_valid ()"><code class="function">nm_utils_ap_mode_security_valid()</code></a> instead. -</p> -<div class="variablelist"><table border="0" class="variablelist"> -<colgroup> -<col align="left" valign="top"> -<col> -</colgroup> -<tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> -<td>the security type to check AP flags and device capabilties against, -e.g. <a class="link" href="libnm-nm-utils.html#NMU-SEC-STATIC-WEP:CAPS"><span class="type">NMU_SEC_STATIC_WEP</span></a> +<td class="function_type"> +<span class="returnvalue">GPtrArray</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip-addresses-from-variant" title="nm_utils_ip_addresses_from_variant ()">nm_utils_ip_addresses_from_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>wifi_caps</code></em> :</span></p></td> -<td>bitfield of the capabilities of the specific Wi-Fi device, e.g. -<a class="link" href="libnm-nm-dbus-interface.html#NM-WIFI-DEVICE-CAP-CIPHER-WEP40:CAPS"><span class="type">NM_WIFI_DEVICE_CAP_CIPHER_WEP40</span></a> +<td class="function_type"> +<span class="returnvalue">GVariant</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip-routes-to-variant" title="nm_utils_ip_routes_to_variant ()">nm_utils_ip_routes_to_variant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>have_ap</code></em> :</span></p></td> -<td>whether the <em class="parameter"><code>ap_flags</code></em>, <em class="parameter"><code>ap_wpa</code></em>, and <em class="parameter"><code>ap_rsn</code></em> arguments are valid</td> +<td class="function_type"> +<span class="returnvalue">GPtrArray</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip-routes-from-variant" title="nm_utils_ip_routes_from_variant ()">nm_utils_ip_routes_from_variant</a> <span class="c_punctuation">()</span> +</td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>adhoc</code></em> :</span></p></td> -<td>whether the capabilities being tested are from an Ad-Hoc AP (IBSS)</td> +<td class="function_type"> +<span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-uuid-generate" title="nm_utils_uuid_generate ()">nm_utils_uuid_generate</a> <span class="c_punctuation">()</span> +</td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>ap_flags</code></em> :</span></p></td> -<td>bitfield of AP capabilities, e.g. <a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-FLAGS-PRIVACY:CAPS"><span class="type">NM_802_11_AP_FLAGS_PRIVACY</span></a> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-file-is-certificate" title="nm_utils_file_is_certificate ()">nm_utils_file_is_certificate</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>ap_wpa</code></em> :</span></p></td> -<td>bitfield of AP capabilties derived from the AP's WPA beacon, -e.g. (<a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-PAIR-TKIP:CAPS"><span class="type">NM_802_11_AP_SEC_PAIR_TKIP</span></a> | <a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-KEY-MGMT-PSK:CAPS"><span class="type">NM_802_11_AP_SEC_KEY_MGMT_PSK</span></a>)</td> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-file-is-private-key" title="nm_utils_file_is_private_key ()">nm_utils_file_is_private_key</a> <span class="c_punctuation">()</span> +</td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>ap_rsn</code></em> :</span></p></td> -<td>bitfield of AP capabilties derived from the AP's RSN/WPA2 beacon, -e.g. (<a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-PAIR-CCMP:CAPS"><span class="type">NM_802_11_AP_SEC_PAIR_CCMP</span></a> | <a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-PAIR-TKIP:CAPS"><span class="type">NM_802_11_AP_SEC_PAIR_TKIP</span></a>)</td> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-file-is-pkcs12" title="nm_utils_file_is_pkcs12 ()">nm_utils_file_is_pkcs12</a> <span class="c_punctuation">()</span> +</td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the device capabilities and AP capabilties intersect and are -compatible with the desired <em class="parameter"><code>type</code></em>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are not</td> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="libnm-nm-utils.html#NMUtilsFileSearchInPathsPredicate" title="NMUtilsFileSearchInPathsPredicate ()">*NMUtilsFileSearchInPathsPredicate</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-file-search-in-paths" title="nm_utils_file_search_in_paths ()">nm_utils_file_search_in_paths</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">guint32</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-freq-to-channel" title="nm_utils_wifi_freq_to_channel ()">nm_utils_wifi_freq_to_channel</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">guint32</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-channel-to-freq" title="nm_utils_wifi_channel_to_freq ()">nm_utils_wifi_channel_to_freq</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">guint32</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-find-next-channel" title="nm_utils_wifi_find_next_channel ()">nm_utils_wifi_find_next_channel</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-is-channel-valid" title="nm_utils_wifi_is_channel_valid ()">nm_utils_wifi_is_channel_valid</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-wifi-strength-bars" title="nm_utils_wifi_strength_bars ()">nm_utils_wifi_strength_bars</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">gsize</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-len" title="nm_utils_hwaddr_len ()">nm_utils_hwaddr_len</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-ntoa" title="nm_utils_hwaddr_ntoa ()">nm_utils_hwaddr_ntoa</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">GByteArray</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-atoba" title="nm_utils_hwaddr_atoba ()">nm_utils_hwaddr_atoba</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">guint8</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()">nm_utils_hwaddr_aton</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-valid" title="nm_utils_hwaddr_valid ()">nm_utils_hwaddr_valid</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-canonical" title="nm_utils_hwaddr_canonical ()">nm_utils_hwaddr_canonical</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-matches" title="nm_utils_hwaddr_matches ()">nm_utils_hwaddr_matches</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-bin2hexstr" title="nm_utils_bin2hexstr ()">nm_utils_bin2hexstr</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">GBytes</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-hexstr2bin" title="nm_utils_hexstr2bin ()">nm_utils_hexstr2bin</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-iface-valid-name" title="nm_utils_iface_valid_name ()">nm_utils_iface_valid_name</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-is-uuid" title="nm_utils_is_uuid ()">nm_utils_is_uuid</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()">nm_utils_inet4_ntop</a> <span class="c_punctuation">()</span> +</td> </tr> -</tbody> -</table></div> -</div> -<hr> -<div class="refsect2"> -<a name="nm-utils-ap-mode-security-valid"></a><h3>nm_utils_ap_mode_security_valid ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_ap_mode_security_valid (<em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NMDeviceWifiCapabilities"><span class="type">NMDeviceWifiCapabilities</span></a> wifi_caps</code></em>);</pre> -<p> -Given a set of device capabilities, and a desired security type to check -against, determines whether the combination of device capabilities and -desired security type are valid for AP/Hotspot connections. -</p> -<div class="variablelist"><table border="0" class="variablelist"> -<colgroup> -<col align="left" valign="top"> -<col> -</colgroup> -<tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> -<td>the security type to check device capabilties against, -e.g. <a class="link" href="libnm-nm-utils.html#NMU-SEC-STATIC-WEP:CAPS"><span class="type">NMU_SEC_STATIC_WEP</span></a> +<td class="function_type">const <span class="returnvalue">char</span> * +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()">nm_utils_inet6_ntop</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>wifi_caps</code></em> :</span></p></td> -<td>bitfield of the capabilities of the specific Wi-Fi device, e.g. -<a class="link" href="libnm-nm-dbus-interface.html#NM-WIFI-DEVICE-CAP-CIPHER-WEP40:CAPS"><span class="type">NM_WIFI_DEVICE_CAP_CIPHER_WEP40</span></a> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ipaddr-valid" title="nm_utils_ipaddr_valid ()">nm_utils_ipaddr_valid</a> <span class="c_punctuation">()</span> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the device capabilities are compatible with the desired -<em class="parameter"><code>type</code></em>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are not.</td> +<td class="function_type"> +<span class="returnvalue">gboolean</span> +</td> +<td class="function_name"> +<a class="link" href="libnm-nm-utils.html#nm-utils-check-virtual-device-compatibility" title="nm_utils_check_virtual_device_compatibility ()">nm_utils_check_virtual_device_compatibility</a> <span class="c_punctuation">()</span> +</td> </tr> </tbody> </table></div> </div> -<hr> -<div class="refsect2"> -<a name="nm-utils-wep-key-valid"></a><h3>nm_utils_wep_key_valid ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_wep_key_valid (<em class="parameter"><code>const <span class="type">char</span> *key</code></em>, - <em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType"><span class="type">NMWepKeyType</span></a> wep_type</code></em>);</pre> -<p> -Checks if <em class="parameter"><code>key</code></em> is a valid WEP key -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<div class="refsect1"> +<a name="libnm-nm-utils.other"></a><h2>Types and Values</h2> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="name"> +<col class="description"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td> -<td>a string that might be a WEP key</td> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType" title="enum NMUtilsSecurityType">NMUtilsSecurityType</a></td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>wep_type</code></em> :</span></p></td> -<td>the <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType"><span class="type">NMWepKeyType</span></a> type of the WEP key</td> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX">NM_UTILS_HWADDR_LEN_MAX</a></td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>key</code></em> is a WEP key, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not</td> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="libnm-nm-utils.html#NM-UTILS-INET-ADDRSTRLEN:CAPS" title="NM_UTILS_INET_ADDRSTRLEN">NM_UTILS_INET_ADDRSTRLEN</a></td> </tr> </tbody> </table></div> </div> -<hr> +<div class="refsect1"> +<a name="libnm-nm-utils.object-hierarchy"></a><h2>Object Hierarchy</h2> +<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a> + <span class="lineart">╰──</span> NMUtilsSecurityType +</pre> +</div> +<div class="refsect1"> +<a name="libnm-nm-utils.description"></a><h2>Description</h2> +<p>A collection of utility functions for working with SSIDs, IP addresses, Wi-Fi +access points and devices, among other things.</p> +</div> +<div class="refsect1"> +<a name="libnm-nm-utils.functions_details"></a><h2>Functions</h2> <div class="refsect2"> -<a name="nm-utils-wpa-psk-valid"></a><h3>nm_utils_wpa_psk_valid ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_wpa_psk_valid (<em class="parameter"><code>const <span class="type">char</span> *psk</code></em>);</pre> -<p> -Checks if <em class="parameter"><code>psk</code></em> is a valid WPA PSK -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-is-empty-ssid"></a><h3>nm_utils_is_empty_ssid ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_is_empty_ssid (<em class="parameter"><code>const <span class="type">guint8</span> *ssid</code></em>, + <em class="parameter"><code><span class="type">gsize</span> len</code></em>);</pre> +<p>Different manufacturers use different mechanisms for not broadcasting the +AP's SSID. This function attempts to detect blank/empty SSIDs using a +number of known SSID-cloaking methods.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.2.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>psk</code></em> :</span></p></td> -<td>a string that might be a WPA PSK</td> +<td class="parameter_name"><p>ssid</p></td> +<td class="parameter_description"><p> pointer to a buffer containing the SSID data. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>psk</code></em> is a WPA PSK, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not</td> +<td class="parameter_name"><p>len</p></td> +<td class="parameter_description"><p>length of the SSID data in <em class="parameter"><code>ssid</code></em> +</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.2.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if the SSID is "empty", <code class="literal">FALSE</code> if it is not</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip4-dns-to-variant"></a><h3>nm_utils_ip4_dns_to_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * nm_utils_ip4_dns_to_variant (<em class="parameter"><code><span class="type">char</span> **dns</code></em>);</pre> -<p> -Utility function to convert an array of IP address strings int a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of -type 'au' representing an array of IPv4 addresses. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-escape-ssid"></a><h3>nm_utils_escape_ssid ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +nm_utils_escape_ssid (<em class="parameter"><code>const <span class="type">guint8</span> *ssid</code></em>, + <em class="parameter"><code><span class="type">gsize</span> len</code></em>);</pre> +<p>This function does a quick printable character conversion of the SSID, simply +replacing embedded NULLs and non-printable characters with the hexadecimal +representation of that character. Intended for debugging only, should not +be used for display of SSIDs.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.3.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>dns</code></em> :</span></p></td> -<td>an array of IP address strings. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span> -</td> +<td class="parameter_name"><p>ssid</p></td> +<td class="parameter_description"><p> pointer to a buffer containing the SSID data. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new floating <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>dns</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> -</td> +<td class="parameter_name"><p>len</p></td> +<td class="parameter_description"><p>length of the SSID data in <em class="parameter"><code>ssid</code></em> +</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.3.6"></a><h4>Returns</h4> +<p> pointer to the escaped SSID, which uses an internal static buffer +and will be overwritten by subsequent calls to this function</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip4-dns-from-variant"></a><h3>nm_utils_ip4_dns_from_variant ()</h3> -<pre class="programlisting"><span class="returnvalue">char</span> ** nm_utils_ip4_dns_from_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'au' representing a list of -IPv4 addresses into an array of IP address strings. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-same-ssid"></a><h3>nm_utils_same_ssid ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_same_ssid (<em class="parameter"><code>const <span class="type">guint8</span> *ssid1</code></em>, + <em class="parameter"><code><span class="type">gsize</span> len1</code></em>, + <em class="parameter"><code>const <span class="type">guint8</span> *ssid2</code></em>, + <em class="parameter"><code><span class="type">gsize</span> len2</code></em>, + <em class="parameter"><code><span class="type">gboolean</span> ignore_trailing_null</code></em>);</pre> +<p>Earlier versions of the Linux kernel added a NULL byte to the end of the +SSID to enable easy printing of the SSID on the console or in a terminal, +but this behavior was problematic (SSIDs are simply byte arrays, not strings) +and thus was changed. This function compensates for that behavior at the +cost of some compatibility with odd SSIDs that may legitimately have trailing +NULLs, even though that is functionally pointless.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.4.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'au'</td> +<td class="parameter_name"><p>ssid1</p></td> +<td class="parameter_description"><p> the first SSID to compare. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len1]</span></td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of IP address strings. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span> -</td> +<td class="parameter_name"><p>len1</p></td> +<td class="parameter_description"><p>length of the SSID data in <em class="parameter"><code>ssid1</code></em> +</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ssid2</p></td> +<td class="parameter_description"><p> the second SSID to compare. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len2]</span></td> +</tr> +<tr> +<td class="parameter_name"><p>len2</p></td> +<td class="parameter_description"><p>length of the SSID data in <em class="parameter"><code>ssid2</code></em> +</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ignore_trailing_null</p></td> +<td class="parameter_description"><p><code class="literal">TRUE</code> to ignore one trailing NULL byte</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.4.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if the SSIDs are the same, <code class="literal">FALSE</code> if they are not</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip4-addresses-to-variant"></a><h3>nm_utils_ip4_addresses_to_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * nm_utils_ip4_addresses_to_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *addresses</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *gateway</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects representing -IPv4 addresses into a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau' representing an array of -NetworkManager IPv4 addresses (which are tuples of address, prefix, and -gateway). The "gateway" field of the first address will get the value of -<em class="parameter"><code>gateway</code></em> (if non-<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>). In all of the other addresses, that field will be 0. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-ssid-to-utf8"></a><h3>nm_utils_ssid_to_utf8 ()</h3> +<pre class="programlisting"><span class="returnvalue">char</span> * +nm_utils_ssid_to_utf8 (<em class="parameter"><code>const <span class="type">guint8</span> *ssid</code></em>, + <em class="parameter"><code><span class="type">gsize</span> len</code></em>);</pre> +<p>Wi-Fi SSIDs are byte arrays, they are _not_ strings. Thus, an SSID may +contain embedded NULLs and other unprintable characters. Often it is +useful to print the SSID out for debugging purposes, but that should be the +_only_ use of this function. Do not use this function for any persistent +storage of the SSID, since the printable SSID returned from this function +cannot be converted back into the real SSID of the access point.</p> +<p>This function does almost everything humanly possible to convert the input +into a printable UTF-8 string, using roughly the following procedure:</p> +<p>1) if the input data is already UTF-8 safe, no conversion is performed +2) attempts to get the current system language from the LANG environment + variable, and depending on the language, uses a table of alternative + encodings to try. For example, if LANG=hu_HU, the table may first try + the ISO-8859-2 encoding, and if that fails, try the Windows-1250 encoding. + If all fallback encodings fail, replaces non-UTF-8 characters with '?'. +3) If the system language was unable to be determined, falls back to the + ISO-8859-1 encoding, then to the Windows-1251 encoding. +4) If step 3 fails, replaces non-UTF-8 characters with '?'.</p> +<p>Again, this function should be used for debugging and display purposes +_only_.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.5.8"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>addresses</code></em> :</span></p></td> -<td>an array of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span> -</td> +<td class="parameter_name"><p>ssid</p></td> +<td class="parameter_description"><p> pointer to a buffer containing the SSID data. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>gateway</code></em> :</span></p></td> -<td>the gateway IP address. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new floating <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>addresses</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> -</td> +<td class="parameter_name"><p>len</p></td> +<td class="parameter_description"><p>length of the SSID data in <em class="parameter"><code>ssid</code></em> +</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.5.9"></a><h4>Returns</h4> +<p> an allocated string containing a UTF-8 +representation of the SSID, which must be freed by the caller using <code class="function">g_free()</code>. +Returns <code class="literal">NULL</code> on errors. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip4-addresses-from-variant"></a><h3>nm_utils_ip4_addresses_from_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * nm_utils_ip4_addresses_from_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>, - <em class="parameter"><code><span class="type">char</span> **out_gateway</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau' representing a list of -NetworkManager IPv4 addresses (which are tuples of address, prefix, and -gateway) into a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. The "gateway" field of -the first address (if set) will be returned in <em class="parameter"><code>out_gateway</code></em>; the "gateway" fields -of the other addresses are ignored. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-security-valid"></a><h3>nm_utils_security_valid ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_security_valid (<em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType" title="enum NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>, + <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NMDeviceWifiCapabilities" title="enum NMDeviceWifiCapabilities"><span class="type">NMDeviceWifiCapabilities</span></a> wifi_caps</code></em>, + <em class="parameter"><code><span class="type">gboolean</span> have_ap</code></em>, + <em class="parameter"><code><span class="type">gboolean</span> adhoc</code></em>, + <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApFlags" title="enum NM80211ApFlags"><span class="type">NM80211ApFlags</span></a> ap_flags</code></em>, + <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApSecurityFlags" title="enum NM80211ApSecurityFlags"><span class="type">NM80211ApSecurityFlags</span></a> ap_wpa</code></em>, + <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NM80211ApSecurityFlags" title="enum NM80211ApSecurityFlags"><span class="type">NM80211ApSecurityFlags</span></a> ap_rsn</code></em>);</pre> +<p>Given a set of device capabilities, and a desired security type to check +against, determines whether the combination of device, desired security +type, and AP capabilities intersect.</p> +<p>NOTE: this function cannot handle checking security for AP/Hotspot mode; +use <a class="link" href="libnm-nm-utils.html#nm-utils-ap-mode-security-valid" title="nm_utils_ap_mode_security_valid ()"><code class="function">nm_utils_ap_mode_security_valid()</code></a> instead.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.6.6"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau'</td> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>the security type to check AP flags and device capabilties against, +e.g. <a class="link" href="libnm-nm-utils.html#NMU-SEC-STATIC-WEP:CAPS"><span class="type">NMU_SEC_STATIC_WEP</span></a></p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>out_gateway</code></em> :</span></p></td> -<td>on return, will contain the IP gateway. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> -</td> +<td class="parameter_name"><p>wifi_caps</p></td> +<td class="parameter_description"><p>bitfield of the capabilities of the specific Wi-Fi device, e.g. +<a class="link" href="libnm-nm-dbus-interface.html#NM-WIFI-DEVICE-CAP-CIPHER-WEP40:CAPS"><span class="type">NM_WIFI_DEVICE_CAP_CIPHER_WEP40</span></a></p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a newly allocated -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span> -</td> +<td class="parameter_name"><p>have_ap</p></td> +<td class="parameter_description"><p>whether the <em class="parameter"><code>ap_flags</code></em> +, <em class="parameter"><code>ap_wpa</code></em> +, and <em class="parameter"><code>ap_rsn</code></em> +arguments are valid</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>adhoc</p></td> +<td class="parameter_description"><p>whether the capabilities being tested are from an Ad-Hoc AP (IBSS)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ap_flags</p></td> +<td class="parameter_description"><p>bitfield of AP capabilities, e.g. <a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-FLAGS-PRIVACY:CAPS"><span class="type">NM_802_11_AP_FLAGS_PRIVACY</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ap_wpa</p></td> +<td class="parameter_description"><p>bitfield of AP capabilties derived from the AP's WPA beacon, +e.g. (<a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-PAIR-TKIP:CAPS"><span class="type">NM_802_11_AP_SEC_PAIR_TKIP</span></a> | <a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-KEY-MGMT-PSK:CAPS"><span class="type">NM_802_11_AP_SEC_KEY_MGMT_PSK</span></a>)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ap_rsn</p></td> +<td class="parameter_description"><p>bitfield of AP capabilties derived from the AP's RSN/WPA2 beacon, +e.g. (<a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-PAIR-CCMP:CAPS"><span class="type">NM_802_11_AP_SEC_PAIR_CCMP</span></a> | <a class="link" href="libnm-nm-dbus-interface.html#NM-802-11-AP-SEC-PAIR-TKIP:CAPS"><span class="type">NM_802_11_AP_SEC_PAIR_TKIP</span></a>)</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.6.7"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if the device capabilities and AP capabilties intersect and are +compatible with the desired <em class="parameter"><code>type</code></em> +, <code class="literal">FALSE</code> if they are not</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip4-routes-to-variant"></a><h3>nm_utils_ip4_routes_to_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * nm_utils_ip4_routes_to_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *routes</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects representing -IPv4 routes into a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau' representing an array of -NetworkManager IPv4 routes (which are tuples of route, prefix, next hop, and -metric). -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-ap-mode-security-valid"></a><h3>nm_utils_ap_mode_security_valid ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_ap_mode_security_valid (<em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsSecurityType" title="enum NMUtilsSecurityType"><span class="type">NMUtilsSecurityType</span></a> type</code></em>, + <em class="parameter"><code><a class="link" href="libnm-nm-dbus-interface.html#NMDeviceWifiCapabilities" title="enum NMDeviceWifiCapabilities"><span class="type">NMDeviceWifiCapabilities</span></a> wifi_caps</code></em>);</pre> +<p>Given a set of device capabilities, and a desired security type to check +against, determines whether the combination of device capabilities and +desired security type are valid for AP/Hotspot connections.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.7.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>routes</code></em> :</span></p></td> -<td>an array of <a href="https://developer.gnome.org/libnm-util/0.9/NMSettingIP4Config.html#NMIP4Route"><span class="type">NMIP4Route</span></a> objects. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span> -</td> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>the security type to check device capabilties against, +e.g. <a class="link" href="libnm-nm-utils.html#NMU-SEC-STATIC-WEP:CAPS"><span class="type">NMU_SEC_STATIC_WEP</span></a></p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new floating <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>routes</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> -</td> +<td class="parameter_name"><p>wifi_caps</p></td> +<td class="parameter_description"><p>bitfield of the capabilities of the specific Wi-Fi device, e.g. +<a class="link" href="libnm-nm-dbus-interface.html#NM-WIFI-DEVICE-CAP-CIPHER-WEP40:CAPS"><span class="type">NM_WIFI_DEVICE_CAP_CIPHER_WEP40</span></a></p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.7.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if the device capabilities are compatible with the desired +<em class="parameter"><code>type</code></em> +, <code class="literal">FALSE</code> if they are not.</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip4-routes-from-variant"></a><h3>nm_utils_ip4_routes_from_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * nm_utils_ip4_routes_from_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau' representing an array -of NetworkManager IPv4 routes (which are tuples of route, prefix, next hop, -and metric) into a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-wep-key-valid"></a><h3>nm_utils_wep_key_valid ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_wep_key_valid (<em class="parameter"><code>const <span class="type">char</span> *key</code></em>, + <em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType" title="enum NMWepKeyType"><span class="type">NMWepKeyType</span></a> wep_type</code></em>);</pre> +<p>Checks if <em class="parameter"><code>key</code></em> + is a valid WEP key</p> +<div class="refsect3"> +<a name="id-1.6.2.7.8.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aau'</td> +<td class="parameter_name"><p>key</p></td> +<td class="parameter_description"><p>a string that might be a WEP key</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a newly allocated -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span> -</td> +<td class="parameter_name"><p>wep_type</p></td> +<td class="parameter_description"><p>the <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType" title="enum NMWepKeyType"><span class="type">NMWepKeyType</span></a> type of the WEP key</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.8.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if <em class="parameter"><code>key</code></em> +is a WEP key, <code class="literal">FALSE</code> if not</p> +<p></p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="nm-utils-wpa-psk-valid"></a><h3>nm_utils_wpa_psk_valid ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_wpa_psk_valid (<em class="parameter"><code>const <span class="type">char</span> *psk</code></em>);</pre> +<p>Checks if <em class="parameter"><code>psk</code></em> + is a valid WPA PSK</p> +<div class="refsect3"> +<a name="id-1.6.2.7.9.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>psk</p></td> +<td class="parameter_description"><p>a string that might be a WPA PSK</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="id-1.6.2.7.9.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if <em class="parameter"><code>psk</code></em> +is a WPA PSK, <code class="literal">FALSE</code> if not</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip4-netmask-to-prefix"></a><h3>nm_utils_ip4_netmask_to_prefix ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> nm_utils_ip4_netmask_to_prefix (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> netmask</code></em>);</pre> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-ip4-dns-to-variant"></a><h3>nm_utils_ip4_dns_to_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GVariant</span> * +nm_utils_ip4_dns_to_variant (<em class="parameter"><code><span class="type">char</span> **dns</code></em>);</pre> +<p>Utility function to convert an array of IP address strings int a <span class="type">GVariant</span> of +type 'au' representing an array of IPv4 addresses.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.10.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>dns</p></td> +<td class="parameter_description"><p> an array of IP address strings. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="id-1.6.2.7.10.6"></a><h4>Returns</h4> +<p> a new floating <span class="type">GVariant</span> representing <em class="parameter"><code>dns</code></em> +. </p> +<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="nm-utils-ip4-dns-from-variant"></a><h3>nm_utils_ip4_dns_from_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">char</span> ** +nm_utils_ip4_dns_from_variant (<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>);</pre> +<p>Utility function to convert a <span class="type">GVariant</span> of type 'au' representing a list of +IPv4 addresses into an array of IP address strings.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.11.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>value</p></td> +<td class="parameter_description"><p>a <span class="type">GVariant</span> of type 'au'</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="id-1.6.2.7.11.6"></a><h4>Returns</h4> +<p> a <code class="literal">NULL</code>-terminated array of IP address strings. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="nm-utils-ip4-addresses-to-variant"></a><h3>nm_utils_ip4_addresses_to_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GVariant</span> * +nm_utils_ip4_addresses_to_variant (<em class="parameter"><code><span class="type">GPtrArray</span> *addresses</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *gateway</code></em>);</pre> +<p>Utility function to convert a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects representing +IPv4 addresses into a <span class="type">GVariant</span> of type 'aau' representing an array of +NetworkManager IPv4 addresses (which are tuples of address, prefix, and +gateway). The "gateway" field of the first address will get the value of +<em class="parameter"><code>gateway</code></em> + (if non-<code class="literal">NULL</code>). In all of the other addresses, that field will be 0.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.12.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>netmask</code></em> :</span></p></td> -<td>an IPv4 netmask in network byte order</td> +<td class="parameter_name"><p>addresses</p></td> +<td class="parameter_description"><p> an array of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the CIDR prefix represented by the netmask</td> +<td class="parameter_name"><p>gateway</p></td> +<td class="parameter_description"><p> the gateway IP address. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.12.6"></a><h4>Returns</h4> +<p> a new floating <span class="type">GVariant</span> representing <em class="parameter"><code>addresses</code></em> +. </p> +<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip4-prefix-to-netmask"></a><h3>nm_utils_ip4_prefix_to_netmask ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> nm_utils_ip4_prefix_to_netmask (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> prefix</code></em>);</pre> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-ip4-addresses-from-variant"></a><h3>nm_utils_ip4_addresses_from_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GPtrArray</span> * +nm_utils_ip4_addresses_from_variant (<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>, + <em class="parameter"><code><span class="type">char</span> **out_gateway</code></em>);</pre> +<p>Utility function to convert a <span class="type">GVariant</span> of type 'aau' representing a list of +NetworkManager IPv4 addresses (which are tuples of address, prefix, and +gateway) into a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. The "gateway" field of +the first address (if set) will be returned in <em class="parameter"><code>out_gateway</code></em> +; the "gateway" fields +of the other addresses are ignored.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.13.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td> -<td>a CIDR prefix</td> +<td class="parameter_name"><p>value</p></td> +<td class="parameter_description"><p>a <span class="type">GVariant</span> of type 'aau'</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the netmask represented by the prefix, in network byte order</td> +<td class="parameter_name"><p>out_gateway</p></td> +<td class="parameter_description"><p> on return, will contain the IP gateway. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.13.6"></a><h4>Returns</h4> +<p> a newly allocated +<span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip4-get-default-prefix"></a><h3>nm_utils_ip4_get_default_prefix ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> nm_utils_ip4_get_default_prefix (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> ip</code></em>);</pre> -<p> -When the Internet was originally set up, various ranges of IP addresses were +<a name="nm-utils-ip4-routes-to-variant"></a><h3>nm_utils_ip4_routes_to_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GVariant</span> * +nm_utils_ip4_routes_to_variant (<em class="parameter"><code><span class="type">GPtrArray</span> *routes</code></em>);</pre> +<p>Utility function to convert a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects representing +IPv4 routes into a <span class="type">GVariant</span> of type 'aau' representing an array of +NetworkManager IPv4 routes (which are tuples of route, prefix, next hop, and +metric).</p> +<div class="refsect3"> +<a name="id-1.6.2.7.14.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>routes</p></td> +<td class="parameter_description"><p> an array of <a href="https://developer.gnome.org/libnm-util/0.9/NMSettingIP4Config.html#NMIP4Route"><span class="type">NMIP4Route</span></a> objects. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="id-1.6.2.7.14.6"></a><h4>Returns</h4> +<p> a new floating <span class="type">GVariant</span> representing <em class="parameter"><code>routes</code></em> +. </p> +<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="nm-utils-ip4-routes-from-variant"></a><h3>nm_utils_ip4_routes_from_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GPtrArray</span> * +nm_utils_ip4_routes_from_variant (<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>);</pre> +<p>Utility function to convert a <span class="type">GVariant</span> of type 'aau' representing an array +of NetworkManager IPv4 routes (which are tuples of route, prefix, next hop, +and metric) into a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.15.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>value</p></td> +<td class="parameter_description"><p><span class="type">GVariant</span> of type 'aau'</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="id-1.6.2.7.15.6"></a><h4>Returns</h4> +<p> a newly allocated +<span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="nm-utils-ip4-netmask-to-prefix"></a><h3>nm_utils_ip4_netmask_to_prefix ()</h3> +<pre class="programlisting"><span class="returnvalue">guint32</span> +nm_utils_ip4_netmask_to_prefix (<em class="parameter"><code><span class="type">guint32</span> netmask</code></em>);</pre> +<div class="refsect3"> +<a name="id-1.6.2.7.16.4"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>netmask</p></td> +<td class="parameter_description"><p>an IPv4 netmask in network byte order</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="id-1.6.2.7.16.5"></a><h4>Returns</h4> +<p> the CIDR prefix represented by the netmask</p> +<p></p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="nm-utils-ip4-prefix-to-netmask"></a><h3>nm_utils_ip4_prefix_to_netmask ()</h3> +<pre class="programlisting"><span class="returnvalue">guint32</span> +nm_utils_ip4_prefix_to_netmask (<em class="parameter"><code><span class="type">guint32</span> prefix</code></em>);</pre> +<div class="refsect3"> +<a name="id-1.6.2.7.17.4"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>prefix</p></td> +<td class="parameter_description"><p>a CIDR prefix</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="id-1.6.2.7.17.5"></a><h4>Returns</h4> +<p> the netmask represented by the prefix, in network byte order</p> +<p></p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="nm-utils-ip4-get-default-prefix"></a><h3>nm_utils_ip4_get_default_prefix ()</h3> +<pre class="programlisting"><span class="returnvalue">guint32</span> +nm_utils_ip4_get_default_prefix (<em class="parameter"><code><span class="type">guint32</span> ip</code></em>);</pre> +<p>When the Internet was originally set up, various ranges of IP addresses were segmented into three network classes: A, B, and C. This function will return a prefix that is associated with the IP address specified defining where it -falls in the predefined classes. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +falls in the predefined classes.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.18.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>ip</code></em> :</span></p></td> -<td>an IPv4 address (in network byte order)</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the default class prefix for the given IP</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>ip</p></td> +<td class="parameter_description"><p>an IPv4 address (in network byte order)</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.18.6"></a><h4>Returns</h4> +<p> the default class prefix for the given IP</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip6-dns-to-variant"></a><h3>nm_utils_ip6_dns_to_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * nm_utils_ip6_dns_to_variant (<em class="parameter"><code><span class="type">char</span> **dns</code></em>);</pre> -<p> -Utility function to convert an array of IP address strings int a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of -type 'aay' representing an array of IPv6 addresses. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-ip6-dns-to-variant"></a><h3>nm_utils_ip6_dns_to_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GVariant</span> * +nm_utils_ip6_dns_to_variant (<em class="parameter"><code><span class="type">char</span> **dns</code></em>);</pre> +<p>Utility function to convert an array of IP address strings int a <span class="type">GVariant</span> of +type 'aay' representing an array of IPv6 addresses.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.19.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>dns</code></em> :</span></p></td> -<td>an array of IP address strings. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new floating <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>dns</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> -</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>dns</p></td> +<td class="parameter_description"><p> an array of IP address strings. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.19.6"></a><h4>Returns</h4> +<p> a new floating <span class="type">GVariant</span> representing <em class="parameter"><code>dns</code></em> +. </p> +<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip6-dns-from-variant"></a><h3>nm_utils_ip6_dns_from_variant ()</h3> -<pre class="programlisting"><span class="returnvalue">char</span> ** nm_utils_ip6_dns_from_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aay' representing a list of -IPv6 addresses into an array of IP address strings. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-ip6-dns-from-variant"></a><h3>nm_utils_ip6_dns_from_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">char</span> ** +nm_utils_ip6_dns_from_variant (<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>);</pre> +<p>Utility function to convert a <span class="type">GVariant</span> of type 'aay' representing a list of +IPv6 addresses into an array of IP address strings.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.20.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aay'</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of IP address strings. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span> -</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>value</p></td> +<td class="parameter_description"><p>a <span class="type">GVariant</span> of type 'aay'</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.20.6"></a><h4>Returns</h4> +<p> a <code class="literal">NULL</code>-terminated array of IP address strings. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip6-addresses-to-variant"></a><h3>nm_utils_ip6_addresses_to_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * nm_utils_ip6_addresses_to_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *addresses</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *gateway</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects representing -IPv6 addresses into a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuay)' representing an array of +<a name="nm-utils-ip6-addresses-to-variant"></a><h3>nm_utils_ip6_addresses_to_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GVariant</span> * +nm_utils_ip6_addresses_to_variant (<em class="parameter"><code><span class="type">GPtrArray</span> *addresses</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *gateway</code></em>);</pre> +<p>Utility function to convert a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects representing +IPv6 addresses into a <span class="type">GVariant</span> of type 'a(ayuay)' representing an array of NetworkManager IPv6 addresses (which are tuples of address, prefix, and gateway). The "gateway" field of the first address will get the value of -<em class="parameter"><code>gateway</code></em> (if non-<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>). In all of the other addresses, that field will be -all 0s. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<em class="parameter"><code>gateway</code></em> + (if non-<code class="literal">NULL</code>). In all of the other addresses, that field will be +all 0s.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.21.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>addresses</code></em> :</span></p></td> -<td>an array of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span> -</td> +<td class="parameter_name"><p>addresses</p></td> +<td class="parameter_description"><p> an array of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>gateway</code></em> :</span></p></td> -<td>the gateway IP address. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new floating <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>addresses</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> -</td> +<td class="parameter_name"><p>gateway</p></td> +<td class="parameter_description"><p> the gateway IP address. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.21.6"></a><h4>Returns</h4> +<p> a new floating <span class="type">GVariant</span> representing <em class="parameter"><code>addresses</code></em> +. </p> +<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip6-addresses-from-variant"></a><h3>nm_utils_ip6_addresses_from_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * nm_utils_ip6_addresses_from_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>, - <em class="parameter"><code><span class="type">char</span> **out_gateway</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuay)' representing a +<a name="nm-utils-ip6-addresses-from-variant"></a><h3>nm_utils_ip6_addresses_from_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GPtrArray</span> * +nm_utils_ip6_addresses_from_variant (<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>, + <em class="parameter"><code><span class="type">char</span> **out_gateway</code></em>);</pre> +<p>Utility function to convert a <span class="type">GVariant</span> of type 'a(ayuay)' representing a list of NetworkManager IPv6 addresses (which are tuples of address, prefix, -and gateway) into a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. The "gateway" field -of the first address (if set) will be returned in <em class="parameter"><code>out_gateway</code></em>; the "gateway" -fields of the other addresses are ignored. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +and gateway) into a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. The "gateway" field +of the first address (if set) will be returned in <em class="parameter"><code>out_gateway</code></em> +; the "gateway" +fields of the other addresses are ignored.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.22.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuay)'</td> +<td class="parameter_name"><p>value</p></td> +<td class="parameter_description"><p>a <span class="type">GVariant</span> of type 'a(ayuay)'</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>out_gateway</code></em> :</span></p></td> -<td>on return, will contain the IP gateway. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a newly allocated -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span> -</td> +<td class="parameter_name"><p>out_gateway</p></td> +<td class="parameter_description"><p> on return, will contain the IP gateway. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.22.6"></a><h4>Returns</h4> +<p> a newly allocated +<span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip6-routes-to-variant"></a><h3>nm_utils_ip6_routes_to_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * nm_utils_ip6_routes_to_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *routes</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects representing -IPv6 routes into a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuayu)' representing an array of +<a name="nm-utils-ip6-routes-to-variant"></a><h3>nm_utils_ip6_routes_to_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GVariant</span> * +nm_utils_ip6_routes_to_variant (<em class="parameter"><code><span class="type">GPtrArray</span> *routes</code></em>);</pre> +<p>Utility function to convert a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects representing +IPv6 routes into a <span class="type">GVariant</span> of type 'a(ayuayu)' representing an array of NetworkManager IPv6 routes (which are tuples of route, prefix, next hop, and -metric). -</p> -<div class="variablelist"><table border="0" class="variablelist"> +metric).</p> +<div class="refsect3"> +<a name="id-1.6.2.7.23.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>routes</code></em> :</span></p></td> -<td>an array of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new floating <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>routes</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> -</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>routes</p></td> +<td class="parameter_description"><p> an array of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.23.6"></a><h4>Returns</h4> +<p> a new floating <span class="type">GVariant</span> representing <em class="parameter"><code>routes</code></em> +. </p> +<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip6-routes-from-variant"></a><h3>nm_utils_ip6_routes_from_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * nm_utils_ip6_routes_from_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuayu)' representing an +<a name="nm-utils-ip6-routes-from-variant"></a><h3>nm_utils_ip6_routes_from_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GPtrArray</span> * +nm_utils_ip6_routes_from_variant (<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>);</pre> +<p>Utility function to convert a <span class="type">GVariant</span> of type 'a(ayuayu)' representing an array of NetworkManager IPv6 routes (which are tuples of route, prefix, next -hop, and metric) into a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +hop, and metric) into a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.24.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'a(ayuayu)'</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a newly allocated -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span> -</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>value</p></td> +<td class="parameter_description"><p><span class="type">GVariant</span> of type 'a(ayuayu)'</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.24.6"></a><h4>Returns</h4> +<p> a newly allocated +<span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip-addresses-to-variant"></a><h3>nm_utils_ip_addresses_to_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * nm_utils_ip_addresses_to_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *addresses</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects representing -IPv4 or IPv6 addresses into a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aa{sv}' representing an +<a name="nm-utils-ip-addresses-to-variant"></a><h3>nm_utils_ip_addresses_to_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GVariant</span> * +nm_utils_ip_addresses_to_variant (<em class="parameter"><code><span class="type">GPtrArray</span> *addresses</code></em>);</pre> +<p>Utility function to convert a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects representing +IPv4 or IPv6 addresses into a <span class="type">GVariant</span> of type 'aa{sv}' representing an array of new-style NetworkManager IP addresses. All addresses will include "address" (an IP address string), and "prefix" (a uint). Some addresses may -include additional attributes. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +include additional attributes.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.25.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>addresses</code></em> :</span></p></td> -<td>an array of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new floating <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>addresses</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> -</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>addresses</p></td> +<td class="parameter_description"><p> an array of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.25.6"></a><h4>Returns</h4> +<p> a new floating <span class="type">GVariant</span> representing <em class="parameter"><code>addresses</code></em> +. </p> +<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip-addresses-from-variant"></a><h3>nm_utils_ip_addresses_from_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * nm_utils_ip_addresses_from_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>, - <em class="parameter"><code><span class="type">int</span> family</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing a list of new-style +<a name="nm-utils-ip-addresses-from-variant"></a><h3>nm_utils_ip_addresses_from_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GPtrArray</span> * +nm_utils_ip_addresses_from_variant (<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>, + <em class="parameter"><code><span class="type">int</span> family</code></em>);</pre> +<p>Utility function to convert a <span class="type">GVariant</span> representing a list of new-style NetworkManager IPv4 or IPv6 addresses (as described in the documentation for -<a class="link" href="libnm-nm-utils.html#nm-utils-ip-addresses-to-variant" title="nm_utils_ip_addresses_to_variant ()"><code class="function">nm_utils_ip_addresses_to_variant()</code></a>) into a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> -objects. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a class="link" href="libnm-nm-utils.html#nm-utils-ip-addresses-to-variant" title="nm_utils_ip_addresses_to_variant ()"><code class="function">nm_utils_ip_addresses_to_variant()</code></a>) into a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> +objects.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.26.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aa{sv}'</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>family</code></em> :</span></p></td> -<td>an IP address family</td> +<td class="parameter_name"><p>value</p></td> +<td class="parameter_description"><p>a <span class="type">GVariant</span> of type 'aa{sv}'</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a newly allocated -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span> -</td> +<td class="parameter_name"><p>family</p></td> +<td class="parameter_description"><p>an IP address family</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.26.6"></a><h4>Returns</h4> +<p> a newly allocated +<span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPAddress"><span class="type">NMIPAddress</span></a> objects. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPAddress]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip-routes-to-variant"></a><h3>nm_utils_ip_routes_to_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * nm_utils_ip_routes_to_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *routes</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects representing -IPv4 or IPv6 routes into a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aa{sv}' representing an array +<a name="nm-utils-ip-routes-to-variant"></a><h3>nm_utils_ip_routes_to_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GVariant</span> * +nm_utils_ip_routes_to_variant (<em class="parameter"><code><span class="type">GPtrArray</span> *routes</code></em>);</pre> +<p>Utility function to convert a <span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects representing +IPv4 or IPv6 routes into a <span class="type">GVariant</span> of type 'aa{sv}' representing an array of new-style NetworkManager IP routes (which are tuples of destination, -prefix, next hop, metric, and additional attributes). -</p> -<div class="variablelist"><table border="0" class="variablelist"> +prefix, next hop, metric, and additional attributes).</p> +<div class="refsect3"> +<a name="id-1.6.2.7.27.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>routes</code></em> :</span></p></td> -<td>an array of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new floating <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing <em class="parameter"><code>routes</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> -</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>routes</p></td> +<td class="parameter_description"><p> an array of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.27.6"></a><h4>Returns</h4> +<p> a new floating <span class="type">GVariant</span> representing <em class="parameter"><code>routes</code></em> +. </p> +<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ip-routes-from-variant"></a><h3>nm_utils_ip_routes_from_variant ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * nm_utils_ip_routes_from_variant (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>, - <em class="parameter"><code><span class="type">int</span> family</code></em>);</pre> -<p> -Utility function to convert a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> representing a list of new-style +<a name="nm-utils-ip-routes-from-variant"></a><h3>nm_utils_ip_routes_from_variant ()</h3> +<pre class="programlisting"><span class="returnvalue">GPtrArray</span> * +nm_utils_ip_routes_from_variant (<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>, + <em class="parameter"><code><span class="type">int</span> family</code></em>);</pre> +<p>Utility function to convert a <span class="type">GVariant</span> representing a list of new-style NetworkManager IPv4 or IPv6 addresses (which are tuples of destination, -prefix, next hop, metric, and additional attributes) into a <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of -<a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +prefix, next hop, metric, and additional attributes) into a <span class="type">GPtrArray</span> of +<a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.28.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of type 'aa{sv}'</td> +<td class="parameter_name"><p>value</p></td> +<td class="parameter_description"><p>a <span class="type">GVariant</span> of type 'aa{sv}'</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>family</code></em> :</span></p></td> -<td>an IP address family</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a newly allocated -<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span> -</td> +<td class="parameter_name"><p>family</p></td> +<td class="parameter_description"><p>an IP address family</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.28.6"></a><h4>Returns</h4> +<p> a newly allocated +<span class="type">GPtrArray</span> of <a class="link" href="NMSettingIPConfig.html#NMIPRoute"><span class="type">NMIPRoute</span></a> objects. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NMIPRoute]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-uuid-generate"></a><h3>nm_utils_uuid_generate ()</h3> -<pre class="programlisting"><span class="returnvalue">char</span> * nm_utils_uuid_generate (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> -<div class="variablelist"><table border="0" class="variablelist"> -<colgroup> -<col align="left" valign="top"> -<col> -</colgroup> -<tbody><tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a newly allocated UUID suitable for use as the <a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> -object's <a class="link" href="NMSettingConnection.html#NMSettingConnection--id" title='The "id" property'><span class="type">"id"</span></a>: property. Should be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> -</td> -</tr></tbody> -</table></div> +<a name="nm-utils-uuid-generate"></a><h3>nm_utils_uuid_generate ()</h3> +<pre class="programlisting"><span class="returnvalue">char</span> * +nm_utils_uuid_generate (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> +<div class="refsect3"> +<a name="id-1.6.2.7.29.4"></a><h4>Returns</h4> +<p> a newly allocated UUID suitable for use as the <a class="link" href="NMSettingConnection.html" title="NMSettingConnection"><span class="type">NMSettingConnection</span></a> +object's <a class="link" href="NMSettingConnection.html#NMSettingConnection--id" title="The “id” property"><span class="type">“id”</span></a>: property. Should be freed with <code class="function">g_free()</code></p> +<p></p> +</div> </div> <hr> <div class="refsect2"> -<a name="nm-utils-file-is-certificate"></a><h3>nm_utils_file_is_certificate ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_file_is_certificate (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre> -<p> -Tests if <em class="parameter"><code>filename</code></em> has a valid extension for an X.509 certificate file +<a name="nm-utils-file-is-certificate"></a><h3>nm_utils_file_is_certificate ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_file_is_certificate (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre> +<p>Tests if <em class="parameter"><code>filename</code></em> + has a valid extension for an X.509 certificate file (".cer", ".crt", ".der", or ".pem"), and contains a certificate in a format -recognized by NetworkManager. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +recognized by NetworkManager.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.30.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td> -<td>name of the file to test</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file is a certificate, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is not</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>filename</p></td> +<td class="parameter_description"><p>name of the file to test</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.30.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if the file is a certificate, <code class="literal">FALSE</code> if it is not</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-file-is-private-key"></a><h3>nm_utils_file_is_private_key ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_file_is_private_key (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_encrypted</code></em>);</pre> -<p> -Tests if <em class="parameter"><code>filename</code></em> has a valid extension for an X.509 private key file +<a name="nm-utils-file-is-private-key"></a><h3>nm_utils_file_is_private_key ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_file_is_private_key (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>, + <em class="parameter"><code><span class="type">gboolean</span> *out_encrypted</code></em>);</pre> +<p>Tests if <em class="parameter"><code>filename</code></em> + has a valid extension for an X.509 private key file (".der", ".key", ".pem", or ".p12"), and contains a private key in a format -recognized by NetworkManager. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +recognized by NetworkManager.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.31.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td> -<td>name of the file to test</td> +<td class="parameter_name"><p>filename</p></td> +<td class="parameter_description"><p>name of the file to test</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>out_encrypted</code></em> :</span></p></td> -<td>on return, whether the file is encrypted. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file is a private key, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is not</td> +<td class="parameter_name"><p>out_encrypted</p></td> +<td class="parameter_description"><p> on return, whether the file is encrypted. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.31.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if the file is a private key, <code class="literal">FALSE</code> if it is not</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-file-is-pkcs12"></a><h3>nm_utils_file_is_pkcs12 ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_file_is_pkcs12 (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre> -<p> -Tests if <em class="parameter"><code>filename</code></em> is a PKCS#12 file. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-file-is-pkcs12"></a><h3>nm_utils_file_is_pkcs12 ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_file_is_pkcs12 (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre> +<p>Tests if <em class="parameter"><code>filename</code></em> + is a PKCS#12 file.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.32.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td> -<td>name of the file to test</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file is PKCS#12, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is not</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>filename</p></td> +<td class="parameter_description"><p>name of the file to test</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.32.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if the file is PKCS#12, <code class="literal">FALSE</code> if it is not</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="NMUtilsFileSearchInPathsPredicate"></a><h3>NMUtilsFileSearchInPathsPredicate ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (*NMUtilsFileSearchInPathsPredicate) - (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre> +<a name="NMUtilsFileSearchInPathsPredicate"></a><h3>NMUtilsFileSearchInPathsPredicate ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +<span class="c_punctuation">(</span>*NMUtilsFileSearchInPathsPredicate<span class="c_punctuation">)</span> (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>, + <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre> <p> </p> +<div class="refsect3"> +<a name="id-1.6.2.7.33.5"></a><h4>Returns</h4> +<p></p> +</div> </div> <hr> <div class="refsect2"> -<a name="nm-utils-file-search-in-paths"></a><h3>nm_utils_file_search_in_paths ()</h3> -<pre class="programlisting">const <span class="returnvalue">char</span> * nm_utils_file_search_in_paths (<em class="parameter"><code>const <span class="type">char</span> *progname</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *try_first</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *const *paths</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#GFileTest"><span class="type">GFileTest</span></a> file_test_flags</code></em>, - <em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsFileSearchInPathsPredicate" title="NMUtilsFileSearchInPathsPredicate ()"><span class="type">NMUtilsFileSearchInPathsPredicate</span></a> predicate</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> -<p> -Searches for a <em class="parameter"><code>progname</code></em> file in a list of search <em class="parameter"><code>paths</code></em>. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-file-search-in-paths"></a><h3>nm_utils_file_search_in_paths ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +nm_utils_file_search_in_paths (<em class="parameter"><code>const <span class="type">char</span> *progname</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *try_first</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *const *paths</code></em>, + <em class="parameter"><code><span class="type">GFileTest</span> file_test_flags</code></em>, + <em class="parameter"><code><a class="link" href="libnm-nm-utils.html#NMUtilsFileSearchInPathsPredicate" title="NMUtilsFileSearchInPathsPredicate ()"><span class="type">NMUtilsFileSearchInPathsPredicate</span></a> predicate</code></em>, + <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, + <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> +<p>Searches for a <em class="parameter"><code>progname</code></em> + file in a list of search <em class="parameter"><code>paths</code></em> +.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.34.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>progname</code></em> :</span></p></td> -<td>the helper program name, like "iptables" -Must be a non-empty string, without path separator (/).</td> +<td class="parameter_name"><p>progname</p></td> +<td class="parameter_description"><p>the helper program name, like "iptables" +Must be a non-empty string, without path separator (/).</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>try_first</code></em> :</span></p></td> -<td>a custom path to try first before searching. -It is silently ignored if it is empty or not an absolute path. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> +<td class="parameter_name"><p>try_first</p></td> +<td class="parameter_description"><p> a custom path to try first before searching. +It is silently ignored if it is empty or not an absolute path. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>paths</code></em> :</span></p></td> -<td>a <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of search paths. -Can be empty or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, in which case only <em class="parameter"><code>try_first</code></em> is checked. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> +<td class="parameter_name"><p>paths</p></td> +<td class="parameter_description"><p> a <code class="literal">NULL</code> terminated list of search paths. +Can be empty or <code class="literal">NULL</code>, in which case only <em class="parameter"><code>try_first</code></em> +is checked. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>file_test_flags</code></em> :</span></p></td> -<td>the flags passed to <a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#g-file-test"><code class="function">g_file_test()</code></a> when searching -for <em class="parameter"><code>progname</code></em>. Set it to 0 to skip the <a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#g-file-test"><code class="function">g_file_test()</code></a>.</td> +<td class="parameter_name"><p>file_test_flags</p></td> +<td class="parameter_description"><p>the flags passed to <code class="function">g_file_test()</code> when searching +for <em class="parameter"><code>progname</code></em> +. Set it to 0 to skip the <code class="function">g_file_test()</code>.</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>predicate</code></em> :</span></p></td> -<td>if given, pass the file name to this function +<td class="parameter_name"><p>predicate</p></td> +<td class="parameter_description"><p> if given, pass the file name to this function for additional checks. This check is performed after the check for -<em class="parameter"><code>file_test_flags</code></em>. You cannot omit both <em class="parameter"><code>file_test_flags</code></em> and <em class="parameter"><code>predicate</code></em>. <span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span> -</td> +<em class="parameter"><code>file_test_flags</code></em> +. You cannot omit both <em class="parameter"><code>file_test_flags</code></em> +and <em class="parameter"><code>predicate</code></em> +. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>(allow-none): user data for <em class="parameter"><code>predicate</code></em> function. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span> -</td> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p> (allow-none): user data for <em class="parameter"><code>predicate</code></em> +function. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>on failure, a "not found" error using <em class="parameter"><code>error_domain</code></em> and <em class="parameter"><code>error_code</code></em> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the full path to the helper, if found, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found. -The returned string is not owned by the caller, but later -invocations of the function might overwrite it. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> -</td> +<td class="parameter_name"><p>error</p></td> +<td class="parameter_description"><p> on failure, set a "not found" error <code class="literal">G_IO_ERROR</code> <code class="literal">G_IO_ERROR_NOT_FOUND</code>. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.34.6"></a><h4>Returns</h4> +<p> the full path to the helper, if found, or <code class="literal">NULL</code> if not found. +The returned string is not owned by the caller, but later +invocations of the function might overwrite it. </p> +<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-wifi-freq-to-channel"></a><h3>nm_utils_wifi_freq_to_channel ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> nm_utils_wifi_freq_to_channel (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> freq</code></em>);</pre> -<p> -Utility function to translate a Wi-Fi frequency to its corresponding channel. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-wifi-freq-to-channel"></a><h3>nm_utils_wifi_freq_to_channel ()</h3> +<pre class="programlisting"><span class="returnvalue">guint32</span> +nm_utils_wifi_freq_to_channel (<em class="parameter"><code><span class="type">guint32</span> freq</code></em>);</pre> +<p>Utility function to translate a Wi-Fi frequency to its corresponding channel.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.35.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>freq</code></em> :</span></p></td> -<td>frequency</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the channel represented by the frequency or 0</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>freq</p></td> +<td class="parameter_description"><p>frequency</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.35.6"></a><h4>Returns</h4> +<p> the channel represented by the frequency or 0</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-wifi-channel-to-freq"></a><h3>nm_utils_wifi_channel_to_freq ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> nm_utils_wifi_channel_to_freq (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *band</code></em>);</pre> -<p> -Utility function to translate a Wi-Fi channel to its corresponding frequency. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-wifi-channel-to-freq"></a><h3>nm_utils_wifi_channel_to_freq ()</h3> +<pre class="programlisting"><span class="returnvalue">guint32</span> +nm_utils_wifi_channel_to_freq (<em class="parameter"><code><span class="type">guint32</span> channel</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *band</code></em>);</pre> +<p>Utility function to translate a Wi-Fi channel to its corresponding frequency.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.36.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>channel</code></em> :</span></p></td> -<td>channel</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>band</code></em> :</span></p></td> -<td>frequency band for wireless ("a" or "bg")</td> +<td class="parameter_name"><p>channel</p></td> +<td class="parameter_description"><p>channel</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the frequency represented by the channel of the band, -or -1 when the freq is invalid, or 0 when the band -is invalid</td> +<td class="parameter_name"><p>band</p></td> +<td class="parameter_description"><p>frequency band for wireless ("a" or "bg")</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.36.6"></a><h4>Returns</h4> +<p> the frequency represented by the channel of the band, +or -1 when the freq is invalid, or 0 when the band +is invalid</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-wifi-find-next-channel"></a><h3>nm_utils_wifi_find_next_channel ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> nm_utils_wifi_find_next_channel (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>, - <em class="parameter"><code><span class="type">int</span> direction</code></em>, - <em class="parameter"><code><span class="type">char</span> *band</code></em>);</pre> -<p> -Utility function to find out next/previous Wi-Fi channel for a channel. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-wifi-find-next-channel"></a><h3>nm_utils_wifi_find_next_channel ()</h3> +<pre class="programlisting"><span class="returnvalue">guint32</span> +nm_utils_wifi_find_next_channel (<em class="parameter"><code><span class="type">guint32</span> channel</code></em>, + <em class="parameter"><code><span class="type">int</span> direction</code></em>, + <em class="parameter"><code><span class="type">char</span> *band</code></em>);</pre> +<p>Utility function to find out next/previous Wi-Fi channel for a channel.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.37.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>channel</code></em> :</span></p></td> -<td>current channel</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>direction</code></em> :</span></p></td> -<td>whether going downward (0 or less) or upward (1 or more)</td> +<td class="parameter_name"><p>channel</p></td> +<td class="parameter_description"><p>current channel</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>band</code></em> :</span></p></td> -<td>frequency band for wireless ("a" or "bg")</td> +<td class="parameter_name"><p>direction</p></td> +<td class="parameter_description"><p>whether going downward (0 or less) or upward (1 or more)</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the next channel in the specified direction or 0</td> +<td class="parameter_name"><p>band</p></td> +<td class="parameter_description"><p>frequency band for wireless ("a" or "bg")</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.37.6"></a><h4>Returns</h4> +<p> the next channel in the specified direction or 0</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-wifi-is-channel-valid"></a><h3>nm_utils_wifi_is_channel_valid ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_wifi_is_channel_valid (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *band</code></em>);</pre> -<p> -Utility function to verify Wi-Fi channel validity. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-wifi-is-channel-valid"></a><h3>nm_utils_wifi_is_channel_valid ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_wifi_is_channel_valid (<em class="parameter"><code><span class="type">guint32</span> channel</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *band</code></em>);</pre> +<p>Utility function to verify Wi-Fi channel validity.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.38.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>channel</code></em> :</span></p></td> -<td>channel</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>band</code></em> :</span></p></td> -<td>frequency band for wireless ("a" or "bg")</td> +<td class="parameter_name"><p>channel</p></td> +<td class="parameter_description"><p>channel</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> -</td> +<td class="parameter_name"><p>band</p></td> +<td class="parameter_description"><p>frequency band for wireless ("a" or "bg")</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.38.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> or <code class="literal">FALSE</code></p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-wifi-strength-bars"></a><h3>nm_utils_wifi_strength_bars ()</h3> -<pre class="programlisting">const <span class="returnvalue">char</span> * nm_utils_wifi_strength_bars (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> strength</code></em>);</pre> -<p> -Converts <em class="parameter"><code>strength</code></em> into a 4-character-wide graphical representation of +<a name="nm-utils-wifi-strength-bars"></a><h3>nm_utils_wifi_strength_bars ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +nm_utils_wifi_strength_bars (<em class="parameter"><code><span class="type">guint8</span> strength</code></em>);</pre> +<p>Converts <em class="parameter"><code>strength</code></em> + into a 4-character-wide graphical representation of strength suitable for printing to stdout. If the current locale and terminal support it, this will use unicode graphics characters to represent -"bars". Otherwise it will use 0 to 4 asterisks. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +"bars". Otherwise it will use 0 to 4 asterisks.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.39.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>strength</code></em> :</span></p></td> -<td>the access point strength, from 0 to 100</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the graphical representation of the access point strength</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>strength</p></td> +<td class="parameter_description"><p>the access point strength, from 0 to 100</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> </table></div> </div> -<hr> -<div class="refsect2"> -<a name="NM-UTILS-HWADDR-LEN-MAX:CAPS"></a><h3>NM_UTILS_HWADDR_LEN_MAX</h3> -<pre class="programlisting">#define NM_UTILS_HWADDR_LEN_MAX 20 /* INFINIBAND_ALEN */ -</pre> -<p> -The maximum length of hardware addresses handled by NetworkManager itself, -<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-len" title="nm_utils_hwaddr_len ()"><code class="function">nm_utils_hwaddr_len()</code></a>, and <a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()"><code class="function">nm_utils_hwaddr_aton()</code></a>. -</p> +<div class="refsect3"> +<a name="id-1.6.2.7.39.6"></a><h4>Returns</h4> +<p> the graphical representation of the access point strength</p> +<p></p> +</div> </div> <hr> <div class="refsect2"> -<a name="nm-utils-hwaddr-len"></a><h3>nm_utils_hwaddr_len ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> nm_utils_hwaddr_len (<em class="parameter"><code><span class="type">int</span> type</code></em>);</pre> -<p> -Returns the length in octets of a hardware address of type <em class="parameter"><code>type</code></em>. -</p> -<p> -It is an error to call this function with any value other than -<code class="literal">ARPHRD_ETHER</code> or <code class="literal">ARPHRD_INFINIBAND</code>. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-hwaddr-len"></a><h3>nm_utils_hwaddr_len ()</h3> +<pre class="programlisting"><span class="returnvalue">gsize</span> +nm_utils_hwaddr_len (<em class="parameter"><code><span class="type">int</span> type</code></em>);</pre> +<p>Returns the length in octets of a hardware address of type <em class="parameter"><code>type</code></em> +.</p> +<p>It is an error to call this function with any value other than +<code class="literal">ARPHRD_ETHER</code> or <code class="literal">ARPHRD_INFINIBAND</code>.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.40.6"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> -<td>the type of address; either <code class="literal">ARPHRD_ETHER</code> or -<code class="literal">ARPHRD_INFINIBAND</code> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the length.</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>type</p></td> +<td class="parameter_description"><p>the type of address; either <code class="literal">ARPHRD_ETHER</code> or +<code class="literal">ARPHRD_INFINIBAND</code></p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.40.7"></a><h4>Returns</h4> +<p> the length.</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-hwaddr-ntoa"></a><h3>nm_utils_hwaddr_ntoa ()</h3> -<pre class="programlisting"><span class="returnvalue">char</span> * nm_utils_hwaddr_ntoa (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre> -<p> -Converts <em class="parameter"><code>addr</code></em> to textual form. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-hwaddr-ntoa"></a><h3>nm_utils_hwaddr_ntoa ()</h3> +<pre class="programlisting"><span class="returnvalue">char</span> * +nm_utils_hwaddr_ntoa (<em class="parameter"><code><span class="type">gconstpointer</span> addr</code></em>, + <em class="parameter"><code><span class="type">gsize</span> length</code></em>);</pre> +<p>Converts <em class="parameter"><code>addr</code></em> + to textual form.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.41.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> -<td>a binary hardware address. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span> -</td> +<td class="parameter_name"><p>addr</p></td> +<td class="parameter_description"><p> a binary hardware address. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span></td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> -<td>the length of <em class="parameter"><code>addr</code></em> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the textual form of <em class="parameter"><code>addr</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> -</td> +<td class="parameter_name"><p>length</p></td> +<td class="parameter_description"><p>the length of <em class="parameter"><code>addr</code></em> +</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.41.6"></a><h4>Returns</h4> +<p> the textual form of <em class="parameter"><code>addr</code></em> +. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-hwaddr-atoba"></a><h3>nm_utils_hwaddr_atoba ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="returnvalue">GByteArray</span></a> * nm_utils_hwaddr_atoba (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre> -<p> -Parses <em class="parameter"><code>asc</code></em> and converts it to binary form in a <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>. See -<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()"><code class="function">nm_utils_hwaddr_aton()</code></a> if you don't want a <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-hwaddr-atoba"></a><h3>nm_utils_hwaddr_atoba ()</h3> +<pre class="programlisting"><span class="returnvalue">GByteArray</span> * +nm_utils_hwaddr_atoba (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, + <em class="parameter"><code><span class="type">gsize</span> length</code></em>);</pre> +<p>Parses <em class="parameter"><code>asc</code></em> + and converts it to binary form in a <span class="type">GByteArray</span>. See +<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()"><code class="function">nm_utils_hwaddr_aton()</code></a> if you don't want a <span class="type">GByteArray</span>.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.42.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>asc</code></em> :</span></p></td> -<td>the ASCII representation of a hardware address</td> +<td class="parameter_name"><p>asc</p></td> +<td class="parameter_description"><p>the ASCII representation of a hardware address</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> -<td>the expected length in bytes of the result</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>asc</code></em> couldn't -be parsed. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> -</td> +<td class="parameter_name"><p>length</p></td> +<td class="parameter_description"><p>the expected length in bytes of the result</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.42.6"></a><h4>Returns</h4> +<p> a new <span class="type">GByteArray</span>, or <code class="literal">NULL</code> if <em class="parameter"><code>asc</code></em> +couldn't +be parsed. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-hwaddr-aton"></a><h3>nm_utils_hwaddr_aton ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> * nm_utils_hwaddr_aton (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre> -<p> -Parses <em class="parameter"><code>asc</code></em> and converts it to binary form in <em class="parameter"><code>buffer</code></em>. -Bytes in <em class="parameter"><code>asc</code></em> can be sepatared by colons (:), or hyphens (-), but not mixed. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-hwaddr-aton"></a><h3>nm_utils_hwaddr_aton ()</h3> +<pre class="programlisting"><span class="returnvalue">guint8</span> * +nm_utils_hwaddr_aton (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, + <em class="parameter"><code><span class="type">gpointer</span> buffer</code></em>, + <em class="parameter"><code><span class="type">gsize</span> length</code></em>);</pre> +<p>Parses <em class="parameter"><code>asc</code></em> + and converts it to binary form in <em class="parameter"><code>buffer</code></em> +. +Bytes in <em class="parameter"><code>asc</code></em> + can be sepatared by colons (:), or hyphens (-), but not mixed.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.43.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>asc</code></em> :</span></p></td> -<td>the ASCII representation of a hardware address</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> -<td>buffer to store the result into</td> +<td class="parameter_name"><p>asc</p></td> +<td class="parameter_description"><p>the ASCII representation of a hardware address</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> -<td>the expected length in bytes of the result and -the size of the buffer in bytes.</td> +<td class="parameter_name"><p>buffer</p></td> +<td class="parameter_description"><p>buffer to store the result into</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<em class="parameter"><code>buffer</code></em>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>asc</code></em> couldn't be parsed -or would be shorter or longer than <em class="parameter"><code>length</code></em>.</td> +<td class="parameter_name"><p>length</p></td> +<td class="parameter_description"><p>the expected length in bytes of the result and +the size of the buffer in bytes.</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.43.6"></a><h4>Returns</h4> +<p> <em class="parameter"><code>buffer</code></em> +, or <code class="literal">NULL</code> if <em class="parameter"><code>asc</code></em> +couldn't be parsed +or would be shorter or longer than <em class="parameter"><code>length</code></em> +.</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-hwaddr-valid"></a><h3>nm_utils_hwaddr_valid ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_hwaddr_valid (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> length</code></em>);</pre> -<p> -Parses <em class="parameter"><code>asc</code></em> to see if it is a valid hardware address of the given -length. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-hwaddr-valid"></a><h3>nm_utils_hwaddr_valid ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_hwaddr_valid (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, + <em class="parameter"><code><span class="type">gssize</span> length</code></em>);</pre> +<p>Parses <em class="parameter"><code>asc</code></em> + to see if it is a valid hardware address of the given +length.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.44.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>asc</code></em> :</span></p></td> -<td>the ASCII representation of a hardware address</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> -<td>the length of address that <em class="parameter"><code>asc</code></em> is expected to convert to -(or -1 to accept any length up to <a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX"><code class="literal">NM_UTILS_HWADDR_LEN_MAX</code></a>)</td> +<td class="parameter_name"><p>asc</p></td> +<td class="parameter_description"><p>the ASCII representation of a hardware address</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>asc</code></em> appears to be a valid hardware address -of the indicated length, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</td> +<td class="parameter_name"><p>length</p></td> +<td class="parameter_description"><p>the length of address that <em class="parameter"><code>asc</code></em> +is expected to convert to +(or -1 to accept any length up to <a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX"><code class="literal">NM_UTILS_HWADDR_LEN_MAX</code></a>)</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.44.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if <em class="parameter"><code>asc</code></em> +appears to be a valid hardware address +of the indicated length, <code class="literal">FALSE</code> if not.</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-hwaddr-canonical"></a><h3>nm_utils_hwaddr_canonical ()</h3> -<pre class="programlisting"><span class="returnvalue">char</span> * nm_utils_hwaddr_canonical (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> length</code></em>);</pre> -<p> -Parses <em class="parameter"><code>asc</code></em> to see if it is a valid hardware address of the given +<a name="nm-utils-hwaddr-canonical"></a><h3>nm_utils_hwaddr_canonical ()</h3> +<pre class="programlisting"><span class="returnvalue">char</span> * +nm_utils_hwaddr_canonical (<em class="parameter"><code>const <span class="type">char</span> *asc</code></em>, + <em class="parameter"><code><span class="type">gssize</span> length</code></em>);</pre> +<p>Parses <em class="parameter"><code>asc</code></em> + to see if it is a valid hardware address of the given length, and if so, returns it in canonical form (uppercase, with -leading 0s as needed, and with colons rather than hyphens). -</p> -<div class="variablelist"><table border="0" class="variablelist"> +leading 0s as needed, and with colons rather than hyphens).</p> +<div class="refsect3"> +<a name="id-1.6.2.7.45.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>asc</code></em> :</span></p></td> -<td>the ASCII representation of a hardware address</td> +<td class="parameter_name"><p>asc</p></td> +<td class="parameter_description"><p>the ASCII representation of a hardware address</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> -<td>the length of address that <em class="parameter"><code>asc</code></em> is expected to convert to -(or -1 to accept any length up to <a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX"><code class="literal">NM_UTILS_HWADDR_LEN_MAX</code></a>)</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the canonicalized address if <em class="parameter"><code>asc</code></em> appears to -be a valid hardware address of the indicated length, <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if not. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> -</td> +<td class="parameter_name"><p>length</p></td> +<td class="parameter_description"><p>the length of address that <em class="parameter"><code>asc</code></em> +is expected to convert to +(or -1 to accept any length up to <a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX"><code class="literal">NM_UTILS_HWADDR_LEN_MAX</code></a>)</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.45.6"></a><h4>Returns</h4> +<p> the canonicalized address if <em class="parameter"><code>asc</code></em> +appears to +be a valid hardware address of the indicated length, <code class="literal">NULL</code> if not. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-hwaddr-matches"></a><h3>nm_utils_hwaddr_matches ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_hwaddr_matches (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> hwaddr1</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> hwaddr1_len</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> hwaddr2</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> hwaddr2_len</code></em>);</pre> -<p> -Generalized hardware address comparison function. Tests if <em class="parameter"><code>hwaddr1</code></em> and -<em class="parameter"><code>hwaddr2</code></em> "equal" (or more precisely, "equivalent"), with several advantages -over a simple <code class="function">memcmp()</code>: -</p> -<p> - 1. If <em class="parameter"><code>hwaddr1_len</code></em> or <em class="parameter"><code>hwaddr2_len</code></em> is -1, then the corresponding address is - assumed to be ASCII rather than binary, and will be converted to binary - before being compared. -</p> -<p> - 2. If <em class="parameter"><code>hwaddr1</code></em> or <em class="parameter"><code>hwaddr2</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, it is treated instead as though it was - a zero-filled buffer <em class="parameter"><code>hwaddr1_len</code></em> or <em class="parameter"><code>hwaddr2_len</code></em> bytes long. -</p> -<p> - 3. If <em class="parameter"><code>hwaddr1</code></em> and <em class="parameter"><code>hwaddr2</code></em> are InfiniBand hardware addresses (that is, if - they are <code class="literal">INFINIBAND_ALEN</code> bytes long in binary form) - then only the last 8 bytes are compared, since those are the only bytes - that actually identify the hardware. (The other 12 bytes will change - depending on the configuration of the InfiniBand fabric that the device - is connected to.) -</p> -<p> -If a passed-in ASCII hardware address cannot be parsed, or would parse to an +<a name="nm-utils-hwaddr-matches"></a><h3>nm_utils_hwaddr_matches ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_hwaddr_matches (<em class="parameter"><code><span class="type">gconstpointer</span> hwaddr1</code></em>, + <em class="parameter"><code><span class="type">gssize</span> hwaddr1_len</code></em>, + <em class="parameter"><code><span class="type">gconstpointer</span> hwaddr2</code></em>, + <em class="parameter"><code><span class="type">gssize</span> hwaddr2_len</code></em>);</pre> +<p>Generalized hardware address comparison function. Tests if <em class="parameter"><code>hwaddr1</code></em> + and +<em class="parameter"><code>hwaddr2</code></em> + "equal" (or more precisely, "equivalent"), with several advantages +over a simple <code class="function">memcmp()</code>:</p> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"><p>If <em class="parameter"><code>hwaddr1_len</code></em> + or <em class="parameter"><code>hwaddr2_len</code></em> + is -1, then the corresponding address is + assumed to be ASCII rather than binary, and will be converted to binary + before being compared.</p></li> +<li class="listitem"><p>If <em class="parameter"><code>hwaddr1</code></em> + or <em class="parameter"><code>hwaddr2</code></em> + is <code class="literal">NULL</code>, it is treated instead as though it was + a zero-filled buffer <em class="parameter"><code>hwaddr1_len</code></em> + or <em class="parameter"><code>hwaddr2_len</code></em> + bytes long.</p></li> +<li class="listitem"><p>If <em class="parameter"><code>hwaddr1</code></em> + and <em class="parameter"><code>hwaddr2</code></em> + are InfiniBand hardware addresses (that is, if + they are <code class="literal">INFINIBAND_ALEN</code> bytes long in binary form) + then only the last 8 bytes are compared, since those are the only bytes + that actually identify the hardware. (The other 12 bytes will change + depending on the configuration of the InfiniBand fabric that the device + is connected to.)</p></li> +</ol></div> +<p>If a passed-in ASCII hardware address cannot be parsed, or would parse to an address larger than <a class="link" href="libnm-nm-utils.html#NM-UTILS-HWADDR-LEN-MAX:CAPS" title="NM_UTILS_HWADDR_LEN_MAX"><code class="literal">NM_UTILS_HWADDR_LEN_MAX</code></a>, then it will silently fail to match. (This means that externally-provided address strings do not need to be sanity-checked before comparing them against known good addresses; they are -guaranteed to not match if they are invalid.) -</p> -<div class="variablelist"><table border="0" class="variablelist"> +guaranteed to not match if they are invalid.)</p> +<div class="refsect3"> +<a name="id-1.6.2.7.46.7"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>hwaddr1</code></em> :</span></p></td> -<td>pointer to a binary or ASCII hardware address, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>hwaddr1_len</code></em> :</span></p></td> -<td>size of <em class="parameter"><code>hwaddr1</code></em>, or -1 if <em class="parameter"><code>hwaddr1</code></em> is ASCII</td> +<td class="parameter_name"><p>hwaddr1</p></td> +<td class="parameter_description"><p>pointer to a binary or ASCII hardware address, or <code class="literal">NULL</code></p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>hwaddr2</code></em> :</span></p></td> -<td>pointer to a binary or ASCII hardware address, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> -</td> +<td class="parameter_name"><p>hwaddr1_len</p></td> +<td class="parameter_description"><p>size of <em class="parameter"><code>hwaddr1</code></em> +, or -1 if <em class="parameter"><code>hwaddr1</code></em> +is ASCII</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>hwaddr2_len</code></em> :</span></p></td> -<td>size of <em class="parameter"><code>hwaddr2</code></em>, or -1 if <em class="parameter"><code>hwaddr2</code></em> is ASCII</td> +<td class="parameter_name"><p>hwaddr2</p></td> +<td class="parameter_description"><p>pointer to a binary or ASCII hardware address, or <code class="literal">NULL</code></p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>hwaddr1</code></em> and <em class="parameter"><code>hwaddr2</code></em> are equivalent, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are -different (or either of them is invalid).</td> +<td class="parameter_name"><p>hwaddr2_len</p></td> +<td class="parameter_description"><p>size of <em class="parameter"><code>hwaddr2</code></em> +, or -1 if <em class="parameter"><code>hwaddr2</code></em> +is ASCII</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.46.8"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if <em class="parameter"><code>hwaddr1</code></em> +and <em class="parameter"><code>hwaddr2</code></em> +are equivalent, <code class="literal">FALSE</code> if they are +different (or either of them is invalid).</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-bin2hexstr"></a><h3>nm_utils_bin2hexstr ()</h3> -<pre class="programlisting"><span class="returnvalue">char</span> * nm_utils_bin2hexstr (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> src</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>, - <em class="parameter"><code><span class="type">int</span> final_len</code></em>);</pre> -<p> -Converts the byte array <em class="parameter"><code>src</code></em> into a hexadecimal string. If <em class="parameter"><code>final_len</code></em> is +<a name="nm-utils-bin2hexstr"></a><h3>nm_utils_bin2hexstr ()</h3> +<pre class="programlisting"><span class="returnvalue">char</span> * +nm_utils_bin2hexstr (<em class="parameter"><code><span class="type">gconstpointer</span> src</code></em>, + <em class="parameter"><code><span class="type">gsize</span> len</code></em>, + <em class="parameter"><code><span class="type">int</span> final_len</code></em>);</pre> +<p>Converts the byte array <em class="parameter"><code>src</code></em> + into a hexadecimal string. If <em class="parameter"><code>final_len</code></em> + is greater than -1, the returned string is terminated at that index -(returned_string[final_len] == '\0'), -</p> -<div class="variablelist"><table border="0" class="variablelist"> +(returned_string[final_len] == '\0'),</p> +<div class="refsect3"> +<a name="id-1.6.2.7.47.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td> -<td>an array of bytes. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span> -</td> +<td class="parameter_name"><p>src</p></td> +<td class="parameter_description"><p> an array of bytes. </p></td> +<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> guint8][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> -<td>the length of the <em class="parameter"><code>src</code></em> array</td> +<td class="parameter_name"><p>len</p></td> +<td class="parameter_description"><p>the length of the <em class="parameter"><code>src</code></em> +array</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>final_len</code></em> :</span></p></td> -<td>an index where to cut off the returned string, or -1</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the textual form of <em class="parameter"><code>bytes</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> -</td> +<td class="parameter_name"><p>final_len</p></td> +<td class="parameter_description"><p>an index where to cut off the returned string, or -1</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.47.6"></a><h4>Returns</h4> +<p> the textual form of <em class="parameter"><code>bytes</code></em> +. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-hexstr2bin"></a><h3>nm_utils_hexstr2bin ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> * nm_utils_hexstr2bin (<em class="parameter"><code>const <span class="type">char</span> *hex</code></em>);</pre> -<p> -Converts a hexadecimal string <em class="parameter"><code>hex</code></em> into an array of bytes. The optional +<a name="nm-utils-hexstr2bin"></a><h3>nm_utils_hexstr2bin ()</h3> +<pre class="programlisting"><span class="returnvalue">GBytes</span> * +nm_utils_hexstr2bin (<em class="parameter"><code>const <span class="type">char</span> *hex</code></em>);</pre> +<p>Converts a hexadecimal string <em class="parameter"><code>hex</code></em> + into an array of bytes. The optional separator ':' may be used between single or pairs of hexadecimal characters, -eg "00:11" or "0:1". Any "0x" at the beginning of <em class="parameter"><code>hex</code></em> is ignored. <em class="parameter"><code>hex</code></em> -may not start or end with ':'. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +eg "00:11" or "0:1". Any "0x" at the beginning of <em class="parameter"><code>hex</code></em> + is ignored. <em class="parameter"><code>hex</code></em> + +may not start or end with ':'.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.48.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>hex</code></em> :</span></p></td> -<td>a string of hexadecimal characters with optional ':' separators</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the converted bytes, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> -</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>hex</p></td> +<td class="parameter_description"><p>a string of hexadecimal characters with optional ':' separators</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.48.6"></a><h4>Returns</h4> +<p> the converted bytes, or <code class="literal">NULL</code> on error. </p> +<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-iface-valid-name"></a><h3>nm_utils_iface_valid_name ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_iface_valid_name (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre> -<p> -This function is a 1:1 copy of the kernel's interface validation -function in net/core/dev.c. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-iface-valid-name"></a><h3>nm_utils_iface_valid_name ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_iface_valid_name (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre> +<p>This function is a 1:1 copy of the kernel's interface validation +function in net/core/dev.c.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.49.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> -<td>Name of interface</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if interface name is valid, otherwise <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned.</td> -</tr> -</tbody> +<tbody><tr> +<td class="parameter_name"><p>name</p></td> +<td class="parameter_description"><p>Name of interface</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.49.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if interface name is valid, otherwise <code class="literal">FALSE</code> is returned.</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-is-uuid"></a><h3>nm_utils_is_uuid ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_is_uuid (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>);</pre> -<p> -Checks if <em class="parameter"><code>str</code></em> is a UUID -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-is-uuid"></a><h3>nm_utils_is_uuid ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_is_uuid (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>);</pre> +<p>Checks if <em class="parameter"><code>str</code></em> + is a UUID</p> +<div class="refsect3"> +<a name="id-1.6.2.7.50.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>str</p></td> +<td class="parameter_description"><p>a string that might be a UUID</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="id-1.6.2.7.50.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> if <em class="parameter"><code>str</code></em> +is a UUID, <code class="literal">FALSE</code> if not</p> +<p></p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="nm-utils-inet4-ntop"></a><h3>nm_utils_inet4_ntop ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +nm_utils_inet4_ntop (<em class="parameter"><code><span class="type">in_addr_t</span> inaddr</code></em>, + <em class="parameter"><code><span class="type">char</span> *dst</code></em>);</pre> +<p>Wrapper for inet_ntop.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.51.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td> -<td>a string that might be a UUID</td> +<td class="parameter_name"><p>inaddr</p></td> +<td class="parameter_description"><p>the address that should be converted to string.</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> is a UUID, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not</td> +<td class="parameter_name"><p>dst</p></td> +<td class="parameter_description"><p>the destination buffer, it must contain at least +<code class="literal">INET_ADDRSTRLEN</code> or <a class="link" href="libnm-nm-utils.html#NM-UTILS-INET-ADDRSTRLEN:CAPS" title="NM_UTILS_INET_ADDRSTRLEN"><code class="literal">NM_UTILS_INET_ADDRSTRLEN</code></a> +characters. If set to <code class="literal">NULL</code>, it will return a pointer to an internal, static +buffer (shared with <a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a>). Beware, that the internal +buffer will be overwritten with ever new call of <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a> or +<a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a> that does not provied it's own <em class="parameter"><code>dst</code></em> +buffer. Also, +using the internal buffer is not thread safe. When in doubt, pass your own +<em class="parameter"><code>dst</code></em> +buffer to avoid these issues.</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> -<hr> -<div class="refsect2"> -<a name="NM-UTILS-INET-ADDRSTRLEN:CAPS"></a><h3>NM_UTILS_INET_ADDRSTRLEN</h3> -<pre class="programlisting">#define NM_UTILS_INET_ADDRSTRLEN INET6_ADDRSTRLEN -</pre> -<p> -Defines the minimal length for a char buffer that is suitable as <em class="parameter"><code>dst</code></em> argument -for both <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a> and <a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a>. -</p> +<div class="refsect3"> +<a name="id-1.6.2.7.51.6"></a><h4>Returns</h4> +<p> the input buffer <em class="parameter"><code>dst</code></em> +, or a pointer to an +internal, static buffer. This function cannot fail.</p> +<p></p> +</div> </div> <hr> <div class="refsect2"> -<a name="nm-utils-inet4-ntop"></a><h3>nm_utils_inet4_ntop ()</h3> -<pre class="programlisting">const <span class="returnvalue">char</span> * nm_utils_inet4_ntop (<em class="parameter"><code><span class="type">in_addr_t</span> inaddr</code></em>, - <em class="parameter"><code><span class="type">char</span> *dst</code></em>);</pre> -<p> -Wrapper for inet_ntop. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-inet6-ntop"></a><h3>nm_utils_inet6_ntop ()</h3> +<pre class="programlisting">const <span class="returnvalue">char</span> * +nm_utils_inet6_ntop (<em class="parameter"><code>const <span class="type">struct in6_addr</span> *in6addr</code></em>, + <em class="parameter"><code><span class="type">char</span> *dst</code></em>);</pre> +<p>Wrapper for inet_ntop.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.52.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>inaddr</code></em> :</span></p></td> -<td>the address that should be converted to string.</td> +<td class="parameter_name"><p>in6addr</p></td> +<td class="parameter_description"><p>the address that should be converted to string.</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>dst</code></em> :</span></p></td> -<td>the destination buffer, it must contain at least -<code class="literal">INET_ADDRSTRLEN</code> or <a class="link" href="libnm-nm-utils.html#NM-UTILS-INET-ADDRSTRLEN:CAPS" title="NM_UTILS_INET_ADDRSTRLEN"><code class="literal">NM_UTILS_INET_ADDRSTRLEN</code></a> -characters. If set to <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, it will return a pointer to an internal, static -buffer (shared with <a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a>). Beware, that the internal -buffer will be overwritten with ever new call of <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a> or -<a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a> that does not provied it's own <em class="parameter"><code>dst</code></em> buffer. Also, +<td class="parameter_name"><p>dst</p></td> +<td class="parameter_description"><p>the destination buffer, it must contain at least +<code class="literal">INET6_ADDRSTRLEN</code> or <a class="link" href="libnm-nm-utils.html#NM-UTILS-INET-ADDRSTRLEN:CAPS" title="NM_UTILS_INET_ADDRSTRLEN"><code class="literal">NM_UTILS_INET_ADDRSTRLEN</code></a> +characters. If set to <code class="literal">NULL</code>, it will return a pointer to an internal, static +buffer (shared with <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a>). Beware, that the internal +buffer will be overwritten with ever new call of <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a> or +<a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a> that does not provied it's own <em class="parameter"><code>dst</code></em> +buffer. Also, using the internal buffer is not thread safe. When in doubt, pass your own -<em class="parameter"><code>dst</code></em> buffer to avoid these issues.</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the input buffer <em class="parameter"><code>dst</code></em>, or a pointer to an -internal, static buffer. This function cannot fail.</td> +<em class="parameter"><code>dst</code></em> +buffer to avoid these issues.</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.52.6"></a><h4>Returns</h4> +<p> the input buffer <em class="parameter"><code>dst</code></em> +, or a pointer to an +internal, static buffer. <code class="literal">NULL</code> is not allowed as <em class="parameter"><code>in6addr</code></em> +, +otherwise, this function cannot fail.</p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-inet6-ntop"></a><h3>nm_utils_inet6_ntop ()</h3> -<pre class="programlisting">const <span class="returnvalue">char</span> * nm_utils_inet6_ntop (<em class="parameter"><code>const <span class="type">struct in6_addr</span> *in6addr</code></em>, - <em class="parameter"><code><span class="type">char</span> *dst</code></em>);</pre> -<p> -Wrapper for inet_ntop. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-ipaddr-valid"></a><h3>nm_utils_ipaddr_valid ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_ipaddr_valid (<em class="parameter"><code><span class="type">int</span> family</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *ip</code></em>);</pre> +<p>Checks if <em class="parameter"><code>ip</code></em> + contains a valid IP address of the given family.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.53.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>in6addr</code></em> :</span></p></td> -<td>the address that should be converted to string.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>dst</code></em> :</span></p></td> -<td>the destination buffer, it must contain at least -<code class="literal">INET6_ADDRSTRLEN</code> or <a class="link" href="libnm-nm-utils.html#NM-UTILS-INET-ADDRSTRLEN:CAPS" title="NM_UTILS_INET_ADDRSTRLEN"><code class="literal">NM_UTILS_INET_ADDRSTRLEN</code></a> -characters. If set to <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, it will return a pointer to an internal, static -buffer (shared with <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a>). Beware, that the internal -buffer will be overwritten with ever new call of <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a> or -<a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a> that does not provied it's own <em class="parameter"><code>dst</code></em> buffer. Also, -using the internal buffer is not thread safe. When in doubt, pass your own -<em class="parameter"><code>dst</code></em> buffer to avoid these issues.</td> +<td class="parameter_name"><p>family</p></td> +<td class="parameter_description"><p><code class="literal">AF_INET</code> or <code class="literal">AF_INET6</code>, or +<code class="literal">AF_UNSPEC</code> to accept either</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the input buffer <em class="parameter"><code>dst</code></em>, or a pointer to an -internal, static buffer. <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> is not allowed as <em class="parameter"><code>in6addr</code></em>, -otherwise, this function cannot fail.</td> +<td class="parameter_name"><p>ip</p></td> +<td class="parameter_description"><p>an IP address</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> +<div class="refsect3"> +<a name="id-1.6.2.7.53.6"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> or <code class="literal">FALSE</code></p> +<p></p> +</div> +</div> <hr> <div class="refsect2"> -<a name="nm-utils-ipaddr-valid"></a><h3>nm_utils_ipaddr_valid ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_ipaddr_valid (<em class="parameter"><code><span class="type">int</span> family</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *ip</code></em>);</pre> -<p> -Checks if <em class="parameter"><code>ip</code></em> contains a valid IP address of the given family. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="nm-utils-check-virtual-device-compatibility"></a><h3>nm_utils_check_virtual_device_compatibility ()</h3> +<pre class="programlisting"><span class="returnvalue">gboolean</span> +nm_utils_check_virtual_device_compatibility + (<em class="parameter"><code><span class="type">GType</span> virtual_type</code></em>, + <em class="parameter"><code><span class="type">GType</span> other_type</code></em>);</pre> +<p>Determines if a connection of type <em class="parameter"><code>virtual_type</code></em> + can (in the +general case) work with connections of type <em class="parameter"><code>other_type</code></em> +.</p> +<p>If <em class="parameter"><code>virtual_type</code></em> + is <code class="literal">NM_TYPE_SETTING_VLAN</code>, then this checks if +<em class="parameter"><code>other_type</code></em> + is a valid type for the parent of a VLAN.</p> +<p>If <em class="parameter"><code>virtual_type</code></em> + is a "master" type (eg, <code class="literal">NM_TYPE_SETTING_BRIDGE</code>), +then this checks if <em class="parameter"><code>other_type</code></em> + is a valid type for a slave of that +master.</p> +<p>Note that even if this returns <code class="literal">TRUE</code> it is not guaranteed that +<span class="emphasis"><em>every</em></span> connection of type <em class="parameter"><code>other_type</code></em> + is +compatible with <em class="parameter"><code>virtual_type</code></em> +; it may depend on the exact +configuration of the two connections, or on the capabilities of an +underlying device driver.</p> +<div class="refsect3"> +<a name="id-1.6.2.7.54.8"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>family</code></em> :</span></p></td> -<td> -<code class="literal">AF_INET</code> or <code class="literal">AF_INET6</code>, or -<code class="literal">AF_UNSPEC</code> to accept either</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>ip</code></em> :</span></p></td> -<td>an IP address</td> +<td class="parameter_name"><p>virtual_type</p></td> +<td class="parameter_description"><p>a virtual connection type</p></td> +<td class="parameter_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> -</td> +<td class="parameter_name"><p>other_type</p></td> +<td class="parameter_description"><p>a connection type to test against <em class="parameter"><code>virtual_type</code></em> +</p></td> +<td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> -<hr> +<div class="refsect3"> +<a name="id-1.6.2.7.54.9"></a><h4>Returns</h4> +<p> <code class="literal">TRUE</code> or <code class="literal">FALSE</code></p> +<p></p> +</div> +</div> +</div> +<div class="refsect1"> +<a name="libnm-nm-utils.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> -<a name="nm-utils-check-virtual-device-compatibility"></a><h3>nm_utils_check_virtual_device_compatibility ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_check_virtual_device_compatibility - (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> virtual_type</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> other_type</code></em>);</pre> -<p> -Determines if a connection of type <em class="parameter"><code>virtual_type</code></em> can (in the -general case) work with connections of type <em class="parameter"><code>other_type</code></em>. -</p> -<p> -If <em class="parameter"><code>virtual_type</code></em> is <code class="literal">NM_TYPE_SETTING_VLAN</code>, then this checks if -<em class="parameter"><code>other_type</code></em> is a valid type for the parent of a VLAN. -</p> -<p> -If <em class="parameter"><code>virtual_type</code></em> is a "master" type (eg, <code class="literal">NM_TYPE_SETTING_BRIDGE</code>), -then this checks if <em class="parameter"><code>other_type</code></em> is a valid type for a slave of that -master. -</p> -<p> -Note that even if this returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> it is not guaranteed that -<span class="emphasis"><em>every</em></span> connection of type <em class="parameter"><code>other_type</code></em> is -compatible with <em class="parameter"><code>virtual_type</code></em>; it may depend on the exact -configuration of the two connections, or on the capabilities of an -underlying device driver. -</p> -<div class="variablelist"><table border="0" class="variablelist"> +<a name="NMUtilsSecurityType"></a><h3>enum NMUtilsSecurityType</h3> +<p>Describes generic security mechanisms that 802.11 access points may offer. +Used with <a class="link" href="libnm-nm-utils.html#nm-utils-security-valid" title="nm_utils_security_valid ()"><code class="function">nm_utils_security_valid()</code></a> for checking whether a given access +point is compatible with a network device.</p> +<div class="refsect3"> +<a name="id-1.6.2.8.2.4"></a><h4>Members</h4> +<div class="informaltable"><table width="100%" border="0"> <colgroup> -<col align="left" valign="top"> -<col> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> </colgroup> <tbody> <tr> -<td><p><span class="term"><em class="parameter"><code>virtual_type</code></em> :</span></p></td> -<td>a virtual connection type</td> +<td class="enum_member_name"><p><a name="NMU-SEC-INVALID:CAPS"></a>NMU_SEC_INVALID</p></td> +<td class="enum_member_description"> +<p>unknown or invalid security, placeholder and not used</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="NMU-SEC-NONE:CAPS"></a>NMU_SEC_NONE</p></td> +<td class="enum_member_description"> +<p>unencrypted and open</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="NMU-SEC-STATIC-WEP:CAPS"></a>NMU_SEC_STATIC_WEP</p></td> +<td class="enum_member_description"> +<p>static WEP keys are used for encryption</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="NMU-SEC-LEAP:CAPS"></a>NMU_SEC_LEAP</p></td> +<td class="enum_member_description"> +<p>Cisco LEAP is used for authentication and for generating the +dynamic WEP keys automatically</p> +</td> +<td class="enum_member_annotations"> </td> </tr> <tr> -<td><p><span class="term"><em class="parameter"><code>other_type</code></em> :</span></p></td> -<td>a connection type to test against <em class="parameter"><code>virtual_type</code></em> +<td class="enum_member_name"><p><a name="NMU-SEC-DYNAMIC-WEP:CAPS"></a>NMU_SEC_DYNAMIC_WEP</p></td> +<td class="enum_member_description"> +<p>standard 802.1x is used for authentication and +generating the dynamic WEP keys automatically</p> </td> +<td class="enum_member_annotations"> </td> </tr> <tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> +<td class="enum_member_name"><p><a name="NMU-SEC-WPA-PSK:CAPS"></a>NMU_SEC_WPA_PSK</p></td> +<td class="enum_member_description"> +<p>WPA1 is used with Pre-Shared Keys (PSK)</p> </td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="NMU-SEC-WPA-ENTERPRISE:CAPS"></a>NMU_SEC_WPA_ENTERPRISE</p></td> +<td class="enum_member_description"> +<p>WPA1 is used with 802.1x authentication</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="NMU-SEC-WPA2-PSK:CAPS"></a>NMU_SEC_WPA2_PSK</p></td> +<td class="enum_member_description"> +<p>WPA2/RSN is used with Pre-Shared Keys (PSK)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr> +<tr> +<td class="enum_member_name"><p><a name="NMU-SEC-WPA2-ENTERPRISE:CAPS"></a>NMU_SEC_WPA2_ENTERPRISE</p></td> +<td class="enum_member_description"> +<p>WPA2 is used with 802.1x authentication</p> +</td> +<td class="enum_member_annotations"> </td> </tr> </tbody> </table></div> </div> </div> +<hr> +<div class="refsect2"> +<a name="NM-UTILS-HWADDR-LEN-MAX:CAPS"></a><h3>NM_UTILS_HWADDR_LEN_MAX</h3> +<pre class="programlisting">#define NM_UTILS_HWADDR_LEN_MAX 20 /* INFINIBAND_ALEN */ +</pre> +<p>The maximum length of hardware addresses handled by NetworkManager itself, +<a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-len" title="nm_utils_hwaddr_len ()"><code class="function">nm_utils_hwaddr_len()</code></a>, and <a class="link" href="libnm-nm-utils.html#nm-utils-hwaddr-aton" title="nm_utils_hwaddr_aton ()"><code class="function">nm_utils_hwaddr_aton()</code></a>.</p> +</div> +<hr> +<div class="refsect2"> +<a name="NM-UTILS-INET-ADDRSTRLEN:CAPS"></a><h3>NM_UTILS_INET_ADDRSTRLEN</h3> +<pre class="programlisting">#define NM_UTILS_INET_ADDRSTRLEN INET6_ADDRSTRLEN +</pre> +<p>Defines the minimal length for a char buffer that is suitable as <em class="parameter"><code>dst</code></em> + argument +for both <a class="link" href="libnm-nm-utils.html#nm-utils-inet4-ntop" title="nm_utils_inet4_ntop ()"><code class="function">nm_utils_inet4_ntop()</code></a> and <a class="link" href="libnm-nm-utils.html#nm-utils-inet6-ntop" title="nm_utils_inet6_ntop ()"><code class="function">nm_utils_inet6_ntop()</code></a>.</p> +</div> +</div> </div> <div class="footer"> <hr> - Generated by GTK-Doc V1.19</div> + Generated by GTK-Doc V1.21</div> </body> </html> \ No newline at end of file |