Evaluates to the micro version number of NetworkManager which this source compiled against.
Evaluates to the minor version number of NetworkManager which this source is compiled against.
Connection type describing a connection to devices that support the Bluetooth DUN profile.
Connection type describing a connection to devices that support the Bluetooth NAP (Network Access Point) protocol, which accepts connections via PANU.
Indicates that the FCoE controller should use "fabric" mode (default)
Indicates that the FCoE controller should use "VN2VN" mode.
#NM_SETTING_GSM_BANDS_MAX macro indicate the maximal value that can be used as the allowed frequency bands (#NMSettingGsm:allowed-bands property).
IPv4 configuration should be automatically determined via a method appropriate for the hardware interface, ie DHCP or PPP or some other device-specific manner.
This connection does not use or require IPv4 address and it should be disabled.
IPv4 configuration should be automatically configured for link-local-only operation.
All necessary IPv4 configuration (addresses, prefix, DNS, etc) is specified in the setting's properties.
This connection specifies configuration that allows other computers to connect through it to the default network (usually the Internet). The connection's interface will be assigned a private address, and a DHCP server, caching DNS server, and Network Address Translation (NAT) functionality will be started on this connection's interface to allow other devices to connect through that interface to the default network.
IPv6 configuration should be automatically determined via a method appropriate for the hardware interface, ie router advertisements, DHCP, or PPP or some other device-specific manner.
IPv6 configuration should be automatically determined via DHCPv6 only and router advertisements should be ignored.
IPv6 is not required or is handled by some other mechanism, and NetworkManager should not configure IPv6 for this connection.
IPv6 configuration should be automatically configured for link-local-only operation.
All necessary IPv6 configuration (addresses, prefix, DNS, etc) is specified in the setting's properties.
This connection specifies configuration that allows other computers to connect through it to the default network (usually the Internet). The connection's interface will be assigned a private address, and router advertisements, a caching DNS server, and Network Address Translation (NAT) functionality will be started on this connection's interface to allow other devices to connect through that interface to the default network. (not yet supported for IPv6)
Indicates Ad-Hoc mode where no access point is expected to be present.
Indicates AP/master mode where the wireless device is started as an access point/hotspot.
Indicates infrastructure mode where an access point is expected to be present for this connection.
The maximum length of hardware addresses handled by NetworkManager itself, nm_utils_hwaddr_len(), and nm_utils_hwaddr_aton().
Registers an error quark for #NMConnection if necessary.
Registers an error quark for #NMSetting8021x if necessary.
Registers an error quark for #NMSettingAdsl if necessary.
Registers an error quark for #NMSettingBluetooth if necessary.
Registers an error quark for #NMSettingBond if necessary.
Registers an error quark for #NMSettingBridge if necessary.
Registers an error quark for #NMSettingBridgePort if necessary.
Registers an error quark for #NMSettingCdma if necessary.
Registers an error quark for #NMSettingConnection if necessary.
Registers an error quark for #NMSettingDcb if necessary.
Registers an error quark for #NMSetting if necessary.
Registers an error quark for #NMSettingGeneric if necessary.
Registers an error quark for #NMSettingGsm if necessary.
Registers an error quark for #NMSettingInfiniband if necessary.
Registers an error quark for #NMSettingIP4Config if necessary.
Registers an error quark for #NMSettingIP6Config if necessary.
Registers an error quark for #NMSettingPPP if necessary.
Registers an error quark for #NMSettingPPPOE if necessary.
Registers an error quark for #NMSettingSerial if necessary.
Registers an error quark for #NMSettingTeam if necessary.
Registers an error quark for #NMSettingTeamPort if necessary.
Registers an error quark for #NMSettingVlan if necessary.
Registers an error quark for #NMSettingVPN if necessary.
Registers an error quark for #NMSettingWimax if necessary.
Registers an error quark for #NMSettingWired if necessary.
Registers an error quark for #NMSettingWireless if necessary.
Registers an error quark for #NMSettingWired if necessary.
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.
the security type to check device capabilities against, e.g. #NMU_SEC_STATIC_WEP
bitfield of the capabilities of the specific Wi-Fi device, e.g. #NM_WIFI_DEVICE_CAP_CIPHER_WEP40
Converts a byte-array bytes
into a hexadecimal string.
If final_len
is greater than -1, the returned string is terminated at
that index (returned_string[final_len] == '\0'),
an array of bytes
the length of the bytes
array
an index where to cut off the returned string, or -1
Determines if a connection of type virtual_type
can (in the
general case) work with connections of type other_type
.
If virtual_type
is %NM_TYPE_SETTING_VLAN, then this checks if
other_type
is a valid type for the parent of a VLAN.
If virtual_type
is a "master" type (eg, %NM_TYPE_SETTING_BRIDGE),
then this checks if other_type
is a valid type for a slave of that
master.
Note that even if this returns %TRUE it is not guaranteed that
other_type
is
compatible with virtual_type;
it may depend on the exact
configuration of the two connections, or on the capabilities of an
underlying device driver.
a virtual connection type
a connection type to test against virtual_type
No-op. Although this function still exists for ABI compatibility reasons, it does not have any effect, and does not ever need to be called.
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.
pointer to a buffer containing the SSID data
length of the SSID data in ssid
Utility function to find out if the filename
is in PKCS#12 format.
name of the file to test
Searches for a progname
file in a list of search paths
.
the helper program name, like "iptables" Must be a non-empty string, without path separator (/).
a custom path to try first before searching. It is silently ignored if it is empty or not an absolute path.
a %NULL terminated list of search paths. Can be empty or %NULL, in which case only try_first
is checked.
the flags passed to g_file_test() when searching for progname
. Set it to 0 to skip the g_file_test().
if given, pass the file name to this function for additional checks. This check is performed after the check for file_test_flags
. You cannot omit both file_test_flags
and predicate
.
Converts a hex string (2 characters) into its byte representation.
a string representing a hex byte
Converts a hexadecimal string hex
into a byte-array. The returned array
length is len/
2.
an hex string
the length of the hex
string (it has to be even)
Parses asc
and converts it to binary form in a #GByteArray. See
nm_utils_hwaddr_aton() if you don't want a #GByteArray.
the ASCII representation of a hardware address
the type of address; either
Parses asc
and converts it to binary form in buffer
. See
nm_utils_hwaddr_atoba() if you'd rather have the result in a
#GByteArray.
See also nm_utils_hwaddr_aton_len(), which takes an output length instead of a type.
the ASCII representation of a hardware address
the type of address; either
buffer to store the result into
Parses asc
and converts it to binary form in buffer
.
Bytes in asc
can be sepatared by colons (:), or hyphens (-), but not mixed.
the ASCII representation of a hardware address
buffer to store the result into
the expected length in bytes of the result and the size of the buffer in bytes.
Returns the length in octets of a hardware address of type type
.
the type of address; either
Converts addr
to textual form.
See also nm_utils_hwaddr_ntoa_len(), which takes a length instead of a type.
a binary hardware address
the type of address; either
Converts addr
to textual form.
a binary hardware address
the length of addr
Returns the type (either
the length of hardware address in bytes
Parses asc
to see if it is a valid hardware address of some type.
the ASCII representation of a hardware address
This function is a 1:1 copy of the kernel's interface validation function in net/core/dev.c.
Name of interface
Initializes libnm-util; should be called when starting any program that uses libnm-util. This function can be called more than once.
Utility function to convert a #GPtrArray of #GArrays of #guint32s representing a list of NetworkManager IPv4 addresses (which is a tuple of address, gateway, and prefix) into a #GSList of #NMIP4Address objects. The specific format of this serialization is not guaranteed to be stable and the #GArray may be extended in the future.
#GValue containing a #GPtrArray of #GArrays of #guint32s
Utility function to convert a #GSList of #NMIP4Address objects into a #GPtrArray of #GArrays of #guint32s representing a list of NetworkManager IPv4 addresses (which is a tuple of address, gateway, and prefix). The specific format of this serialization is not guaranteed to be stable and may be extended in the future.
a list of #NMIP4Address objects
a pointer to a #GValue into which to place the converted addresses, which should be unset by the caller (when no longer needed) with g_value_unset().
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.
an IPv4 address (in network byte order)
Utility function to convert a #GPtrArray of #GArrays of #guint32s representing a list of NetworkManager IPv4 routes (which is a tuple of route, next hop, prefix, and metric) into a #GSList of #NMIP4Route objects. The specific format of this serialization is not guaranteed to be stable and may be extended in the future.
#GValue containing a #GPtrArray of #GArrays of #guint32s
Utility function to convert a #GSList of #NMIP4Route objects into a #GPtrArray of #GArrays of #guint32s representing a list of NetworkManager IPv4 routes (which is a tuple of route, next hop, prefix, and metric). The specific format of this serialization is not guaranteed to be stable and may be extended in the future.
a list of #NMIP4Route objects
a pointer to a #GValue into which to place the converted routes, which should be unset by the caller (when no longer needed) with g_value_unset().
Utility function to convert a #GPtrArray of #GValueArrays of (#GArray of guchars) and #guint32 representing a list of NetworkManager IPv6 addresses (which is a tuple of address, prefix, and gateway), into a #GSList of #NMIP6Address objects. The specific format of this serialization is not guaranteed to be stable and the #GValueArray may be extended in the future.
gvalue containing a GPtrArray of GValueArrays of (GArray of guchars) and #guint32
Utility function to convert a #GSList of #NMIP6Address objects into a #GPtrArray of #GValueArrays representing a list of NetworkManager IPv6 addresses (which is a tuple of address, prefix, and gateway). The specific format of this serialization is not guaranteed to be stable and may be extended in the future.
a list of #NMIP6Address objects
a pointer to a #GValue into which to place the converted addresses, which should be unset by the caller (when no longer needed) with g_value_unset().
Utility function #GPtrArray of #GValueArrays of (#GArray of #guchars), #guint32, (#GArray of #guchars), and #guint32 representing a list of NetworkManager IPv6 routes (which is a tuple of destination, prefix, next hop, and metric) into a #GSList of #NMIP6Route objects. The specific format of this serialization is not guaranteed to be stable and may be extended in the future.
#GValue containing a #GPtrArray of #GValueArrays of (#GArray of #guchars), #guint32, (#GArray of #guchars), and #guint32
Utility function to convert a #GSList of #NMIP6Route objects into a #GPtrArray of #GValueArrays of (#GArray of #guchars), #guint32, (#GArray of #guchars), and #guint32 representing a list of NetworkManager IPv6 routes (which is a tuple of destination, prefix, next hop, and metric). The specific format of this serialization is not guaranteed to be stable and may be extended in the future.
a list of #NMIP6Route objects
a pointer to a #GValue into which to place the converted routes, which should be unset by the caller (when no longer needed) with g_value_unset().
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.
pointer to a buffer containing the SSID data
length of the SSID data in ssid
Checks if str
is a UUID
a string that might be a UUID
Encrypts the given RSA private key data with the given password (or generates a password if no password was given) and converts the data to PEM format suitable for writing to a file. It uses Triple DES cipher for the encryption.
RSA private key data to be encrypted
existing password to use, if any
Encrypts the given RSA private key data with the given password (or generates a password if no password was given) and converts the data to PEM format suitable for writing to a file. It uses AES cipher for the encryption.
RSA private key data to be encrypted
existing password to use, if any
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.
first SSID data to compare
second SSID data to compare
%TRUE to ignore one trailing NULL byte
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.
NOTE: this function cannot handle checking security for AP/Hotspot mode; use nm_utils_ap_mode_security_valid() instead.
the security type to check AP flags and device capabilities against, e.g. #NMU_SEC_STATIC_WEP
bitfield of the capabilities of the specific Wi-Fi device, e.g. #NM_WIFI_DEVICE_CAP_CIPHER_WEP40
whether the ap_flags,
ap_wpa,
and ap_rsn
arguments are valid
whether the capabilities being tested are from an Ad-Hoc AP (IBSS)
bitfield of AP capabilities, e.g. #NM_802_11_AP_FLAGS_PRIVACY
bitfield of AP capabilities derived from the AP's WPA beacon, e.g. (#NM_802_11_AP_SEC_PAIR_TKIP | #NM_802_11_AP_SEC_KEY_MGMT_PSK)
bitfield of AP capabilities derived from the AP's RSN/WPA2 beacon, e.g. (#NM_802_11_AP_SEC_PAIR_CCMP | #NM_802_11_AP_SEC_PAIR_TKIP)
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.
This function does almost everything humanly possible to convert the input into a printable UTF-8 string, using roughly the following procedure:
Again, this function should be used for debugging and display purposes only.
a byte array containing the SSID data
For a given s,
this function will always return the same UUID.
a string to use as the seed for the UUID
Checks if key
is a valid WEP key
a string that might be a WEP key
the #NMWepKeyType type of the WEP key
Utility function to translate a Wi-Fi channel to its corresponding frequency.
channel
frequency band for wireless ("a" or "bg")
Utility function to find out next/previous Wi-Fi channel for a channel.
current channel
whether going downward (0 or less) or upward (1 or more)
frequency band for wireless ("a" or "bg")
Utility function to translate a Wi-Fi frequency to its corresponding channel.
frequency
Utility function to verify Wi-Fi channel validity.
channel
frequency band for wireless ("a" or "bg")
Checks if psk
is a valid WPA PSK
a string that might be a WPA PSK
Evaluates to the major version number of NetworkManager which this source is compiled against.