| Top |
NMSettingIP4ConfigNMSettingIP4Config — Describes IPv4 addressing, routing, and name service properties |
GEnum
├── NMSettingIP4DhcpIpv6OnlyPreferred
├── NMSettingIP4LinkLocal
╰── NMSettingIp4ConfigClat
The NMSettingIP4Config object is a NMSetting subclass that describes properties related to IPv4 addressing, routing, and Domain Name Service.
NMSettingIP4Config has few properties or methods of its own; it inherits almost everything from NMSettingIPConfig.
NetworkManager supports 5 values for the “method” property for IPv4. If "auto" is specified then the appropriate automatic method (DHCP, PPP, etc) is used for the interface and most other properties can be left unset. If "link-local" is specified, then a link-local address in the 169.254/16 range will be assigned to the interface. If "manual" is specified, static IP addressing is used and at least one IP address must be given in the "addresses" property. If "shared" is specified (indicating that this connection will provide network access to other computers) then the interface is assigned an address in the 10.42.x.1/24 range and a DHCP and forwarding DNS server are started, and the interface is NAT-ed to the current default network connection. "disabled" means IPv4 will not be used on this connection.
NMSetting *
nm_setting_ip4_config_new (void);
Creates a new NMSettingIP4Config object with default values.
const char *
nm_setting_ip4_config_get_dhcp_client_id
(NMSettingIP4Config *setting);
Returns the value contained in the “dhcp-client-id” property.
const char *
nm_setting_ip4_config_get_dhcp_fqdn (NMSettingIP4Config *setting);
Returns the value contained in the “dhcp-fqdn” property.
Since: 1.2
const char *
nm_setting_ip4_config_get_dhcp_vendor_class_identifier
(NMSettingIP4Config *setting);
Returns the value contained in the “dhcp_vendor_class_identifier” property.
Since: 1.28
NMSettingIP4LinkLocal
nm_setting_ip4_config_get_link_local (NMSettingIP4Config *setting);
Returns the value contained in the “link_local” property.
Since: 1.42
NMSettingIP4DhcpIpv6OnlyPreferred
nm_setting_ip4_config_get_dhcp_ipv6_only_preferred
(NMSettingIP4Config *setting);
Returns the value in the “dhcp-ipv6-only-preferred” property.
Since: 1.52
NMSettingIp4ConfigClat
nm_setting_ip4_config_get_clat (NMSettingIP4Config *setting);
Returns the value in the “clat” property.
Since: 1.58
#define NM_SETTING_IP4_CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER "dhcp-vendor-class-identifier"
#define NM_SETTING_IP4_CONFIG_DHCP_IPV6_ONLY_PREFERRED "dhcp-ipv6-only-preferred"
#define NM_SETTING_IP4_CONFIG_METHOD_AUTO "auto"
IPv4 configuration should be automatically determined via a method appropriate for the hardware interface, ie DHCP or PPP or some other device-specific manner.
#define NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL "link-local"
IPv4 configuration should be automatically configured for link-local-only operation.
#define NM_SETTING_IP4_CONFIG_METHOD_MANUAL "manual"
All necessary IPv4 configuration (addresses, prefix, DNS, etc) is specified in the setting's properties.
#define NM_SETTING_IP4_CONFIG_METHOD_SHARED "shared"
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.
#define NM_SETTING_IP4_CONFIG_METHOD_DISABLED "disabled"
This connection does not use or require IPv4 address and it should be disabled.
NMSettingIP4LinkLocal values indicate whether IPv4 link-local address protocol should be enabled.
|
Allow fallback to a globally configured default. If unspecified, fallback to "auto". Note that if "ipv4.method" is "disabled", this always implies link-local addresses disabled too. |
||
|
Special value which enables LL if "ipv4.method" is set to "link-local". |
||
|
Disable IPv4 link-local protocol. |
||
|
Enable the IPv4 link-local protocol regardless what other protocols such as DHCP or manually assigned IP addresses might be active. |
||
|
Since 1.52. This sets an IPv4 link-local address if no other IPv4 address is set, dynamically removing/re-adding it depending on DHCP leases. |
Since: 1.40
NMSettingIP4DhcpIpv6OnlyPreferred values specify if the "IPv6-Only Preferred" option (RFC 8925) for DHCPv4 is enabled.
|
use the global default value |
||
|
the option is disabled |
||
|
the option is enabled |
||
|
the option is enabled when the IPv6 method is "auto" and CLAT is enabled. Since: 1.58 |
Since: 1.52
NMSettingIP4ConfigClat values specify if CLAT (Customer-side translator) is enabled or not. CLAT is used to implement the client part of 464XLAT (RFC 6877), an architecture that provides IPv4 connectivity to hosts on IPv6-only networks.
|
use the global default value |
||
|
disable CLAT |
||
|
enable CLAT only when the IPv4 method is 'auto' and the device doesn't have a native IPv4 gateway. |
||
|
enable CLAT even with IPv4 methods other than 'auto' and even if the device has a native IPv4 gateway. |
Since: 1.58