Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
IPv4 Settings
Synopsis
- newtype SettingIP4Config = SettingIP4Config (ManagedPtr SettingIP4Config)
- class (GObject o, IsDescendantOf SettingIP4Config o) => IsSettingIP4Config o
- toSettingIP4Config :: (MonadIO m, IsSettingIP4Config o) => o -> m SettingIP4Config
- settingIP4ConfigGetDhcpClientId :: (HasCallStack, MonadIO m, IsSettingIP4Config a) => a -> m Text
- settingIP4ConfigGetDhcpFqdn :: (HasCallStack, MonadIO m, IsSettingIP4Config a) => a -> m Text
- settingIP4ConfigGetDhcpVendorClassIdentifier :: (HasCallStack, MonadIO m, IsSettingIP4Config a) => a -> m Text
- settingIP4ConfigGetLinkLocal :: (HasCallStack, MonadIO m, IsSettingIP4Config a) => a -> m SettingIP4LinkLocal
- settingIP4ConfigNew :: (HasCallStack, MonadIO m) => m SettingIP4Config
- clearSettingIP4ConfigDhcpClientId :: (MonadIO m, IsSettingIP4Config o) => o -> m ()
- constructSettingIP4ConfigDhcpClientId :: (IsSettingIP4Config o, MonadIO m) => Text -> m (GValueConstruct o)
- getSettingIP4ConfigDhcpClientId :: (MonadIO m, IsSettingIP4Config o) => o -> m Text
- setSettingIP4ConfigDhcpClientId :: (MonadIO m, IsSettingIP4Config o) => o -> Text -> m ()
- clearSettingIP4ConfigDhcpFqdn :: (MonadIO m, IsSettingIP4Config o) => o -> m ()
- constructSettingIP4ConfigDhcpFqdn :: (IsSettingIP4Config o, MonadIO m) => Text -> m (GValueConstruct o)
- getSettingIP4ConfigDhcpFqdn :: (MonadIO m, IsSettingIP4Config o) => o -> m Text
- setSettingIP4ConfigDhcpFqdn :: (MonadIO m, IsSettingIP4Config o) => o -> Text -> m ()
- clearSettingIP4ConfigDhcpVendorClassIdentifier :: (MonadIO m, IsSettingIP4Config o) => o -> m ()
- constructSettingIP4ConfigDhcpVendorClassIdentifier :: (IsSettingIP4Config o, MonadIO m) => Text -> m (GValueConstruct o)
- getSettingIP4ConfigDhcpVendorClassIdentifier :: (MonadIO m, IsSettingIP4Config o) => o -> m Text
- setSettingIP4ConfigDhcpVendorClassIdentifier :: (MonadIO m, IsSettingIP4Config o) => o -> Text -> m ()
- constructSettingIP4ConfigLinkLocal :: (IsSettingIP4Config o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getSettingIP4ConfigLinkLocal :: (MonadIO m, IsSettingIP4Config o) => o -> m Int32
- setSettingIP4ConfigLinkLocal :: (MonadIO m, IsSettingIP4Config o) => o -> Int32 -> m ()
Exported types
newtype SettingIP4Config Source #
Memory-managed wrapper type.
Instances
Eq SettingIP4Config Source # | |
Defined in GI.NM.Objects.SettingIP4Config (==) :: SettingIP4Config -> SettingIP4Config -> Bool # (/=) :: SettingIP4Config -> SettingIP4Config -> Bool # | |
GObject SettingIP4Config Source # | |
Defined in GI.NM.Objects.SettingIP4Config | |
ManagedPtrNewtype SettingIP4Config Source # | |
Defined in GI.NM.Objects.SettingIP4Config | |
TypedObject SettingIP4Config Source # | |
Defined in GI.NM.Objects.SettingIP4Config | |
HasParentTypes SettingIP4Config Source # | |
Defined in GI.NM.Objects.SettingIP4Config | |
IsGValue (Maybe SettingIP4Config) Source # | Convert |
Defined in GI.NM.Objects.SettingIP4Config gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe SettingIP4Config -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe SettingIP4Config) # | |
type ParentTypes SettingIP4Config Source # | |
Defined in GI.NM.Objects.SettingIP4Config |
class (GObject o, IsDescendantOf SettingIP4Config o) => IsSettingIP4Config o Source #
Type class for types which can be safely cast to SettingIP4Config
, for instance with toSettingIP4Config
.
Instances
(GObject o, IsDescendantOf SettingIP4Config o) => IsSettingIP4Config o Source # | |
Defined in GI.NM.Objects.SettingIP4Config |
toSettingIP4Config :: (MonadIO m, IsSettingIP4Config o) => o -> m SettingIP4Config Source #
Cast to SettingIP4Config
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
addAddress, addDhcpRejectServer, addDns, addDnsOption, addDnsSearch, addRoute, addRoutingRule, bindProperty, bindPropertyFull, clearAddresses, clearDhcpRejectServers, clearDns, clearDnsOptions, clearDnsSearches, clearRoutes, clearRoutingRules, compare, diff, duplicate, enumerateValues, forceFloating, freezeNotify, getv, hasDnsOptions, isFloating, notify, notifyByPspec, optionClearByName, optionGet, optionGetAllNames, optionGetBoolean, optionGetUint32, optionSet, optionSetBoolean, optionSetUint32, ref, refSink, removeAddress, removeAddressByValue, removeDhcpRejectServer, removeDns, removeDnsByValue, removeDnsOption, removeDnsOptionByValue, removeDnsSearch, removeDnsSearchByValue, removeRoute, removeRouteByValue, removeRoutingRule, runDispose, stealData, stealQdata, thawNotify, toString, unref, verify, verifySecrets, watchClosure.
Getters
getAddress, getAutoRouteExtGw, getDadTimeout, getData, getDbusPropertyType, getDhcpClientId, getDhcpDscp, getDhcpFqdn, getDhcpHostname, getDhcpHostnameFlags, getDhcpIaid, getDhcpRejectServers, getDhcpSendHostname, getDhcpSendRelease, getDhcpTimeout, getDhcpVendorClassIdentifier, getDns, getDnsOption, getDnsPriority, getDnsSearch, getGateway, getIgnoreAutoDns, getIgnoreAutoRoutes, getLinkLocal, getMayFail, getMethod, getName, getNeverDefault, getNumAddresses, getNumDns, getNumDnsOptions, getNumDnsSearches, getNumRoutes, getNumRoutingRules, getProperty, getQdata, getReplaceLocalRule, getRequiredTimeout, getRoute, getRouteMetric, getRouteTable, getRoutingRule, getSecretFlags.
Setters
getDhcpClientId
settingIP4ConfigGetDhcpClientId Source #
:: (HasCallStack, MonadIO m, IsSettingIP4Config a) | |
=> a |
|
-> m Text | Returns: the configured Client ID to send to the DHCP server when requesting addresses via DHCP. |
Returns the value contained in the SettingIP4Config:dhcpClientId property.
getDhcpFqdn
settingIP4ConfigGetDhcpFqdn Source #
:: (HasCallStack, MonadIO m, IsSettingIP4Config a) | |
=> a |
|
-> m Text | Returns: the configured FQDN to send to the DHCP server |
Returns the value contained in the SettingIP4Config:dhcpFqdn property.
Since: 1.2
getDhcpVendorClassIdentifier
settingIP4ConfigGetDhcpVendorClassIdentifier Source #
:: (HasCallStack, MonadIO m, IsSettingIP4Config a) | |
=> a |
|
-> m Text | Returns: the vendor class identifier option to send to the DHCP server |
Returns the value contained in the SettingIP4Config
:dhcp_vendor_class_identifier
property.
Since: 1.28
getLinkLocal
settingIP4ConfigGetLinkLocal Source #
:: (HasCallStack, MonadIO m, IsSettingIP4Config a) | |
=> a |
|
-> m SettingIP4LinkLocal | Returns: the link-local configuration |
Returns the value contained in the SettingIP4Config
:link_local
property.
Since: 1.42
new
:: (HasCallStack, MonadIO m) | |
=> m SettingIP4Config | Returns: the new empty |
Creates a new SettingIP4Config
object with default values.
Properties
dhcpClientId
A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options. When the property is a hex string ('aa:bb:cc') it is interpreted as a binary client ID, in which case the first byte is assumed to be the 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet ARP type and the rest is a MAC address). If the property is not a hex string it is considered as a non-hardware-address client ID and the 'type' field is set to 0.
The special values "mac" and "perm-mac" are supported, which use the current or permanent MAC address of the device to generate a client identifier with type ethernet (01). Currently, these options only work for ethernet type of links.
The special value "ipv6-duid" uses the DUID from "ipv6.dhcp-duid" property as an RFC4361-compliant client identifier. As IAID it uses "ipv4.dhcp-iaid" and falls back to "ipv6.dhcp-iaid" if unset.
The special value "duid" generates a RFC4361-compliant client identifier based on "ipv4.dhcp-iaid" and uses a DUID generated by hashing /etc/machine-id.
The special value "stable" is supported to generate a type 0 client identifier based on the stable-id (see connection.stable-id) and a per-host key. If you set the stable-id, you may want to include the "${DEVICE}" or "${MAC}" specifier to get a per-device key.
The special value "none" prevents any client identifier from being sent. Note that this is normally not recommended.
If unset, a globally configured default from NetworkManager.conf is used. If still unset, the default depends on the DHCP plugin. The internal dhcp client will default to "mac" and the dhclient plugin will try to use one from its config file if present, or won't sent any client-id otherwise.
clearSettingIP4ConfigDhcpClientId :: (MonadIO m, IsSettingIP4Config o) => o -> m () Source #
Set the value of the “dhcp-client-id
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#dhcpClientId
constructSettingIP4ConfigDhcpClientId :: (IsSettingIP4Config o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “dhcp-client-id
” property. This is rarely needed directly, but it is used by new
.
getSettingIP4ConfigDhcpClientId :: (MonadIO m, IsSettingIP4Config o) => o -> m Text Source #
Get the value of the “dhcp-client-id
” property.
When overloading is enabled, this is equivalent to
get
settingIP4Config #dhcpClientId
setSettingIP4ConfigDhcpClientId :: (MonadIO m, IsSettingIP4Config o) => o -> Text -> m () Source #
Set the value of the “dhcp-client-id
” property.
When overloading is enabled, this is equivalent to
set
settingIP4Config [ #dhcpClientId:=
value ]
dhcpFqdn
If the SettingIPConfig:dhcpSendHostname property is True
, then the
specified FQDN will be sent to the DHCP server when acquiring a lease. This
property and SettingIPConfig:dhcpHostname are mutually exclusive and
cannot be set at the same time.
Since: 1.2
clearSettingIP4ConfigDhcpFqdn :: (MonadIO m, IsSettingIP4Config o) => o -> m () Source #
Set the value of the “dhcp-fqdn
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#dhcpFqdn
constructSettingIP4ConfigDhcpFqdn :: (IsSettingIP4Config o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “dhcp-fqdn
” property. This is rarely needed directly, but it is used by new
.
getSettingIP4ConfigDhcpFqdn :: (MonadIO m, IsSettingIP4Config o) => o -> m Text Source #
Get the value of the “dhcp-fqdn
” property.
When overloading is enabled, this is equivalent to
get
settingIP4Config #dhcpFqdn
setSettingIP4ConfigDhcpFqdn :: (MonadIO m, IsSettingIP4Config o) => o -> Text -> m () Source #
Set the value of the “dhcp-fqdn
” property.
When overloading is enabled, this is equivalent to
set
settingIP4Config [ #dhcpFqdn:=
value ]
dhcpVendorClassIdentifier
The Vendor Class Identifier DHCP option (60). Special characters in the data string may be escaped using C-style escapes, nevertheless this property cannot contain nul bytes. If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the DHCP option is not sent to the server.
Since: 1.28
clearSettingIP4ConfigDhcpVendorClassIdentifier :: (MonadIO m, IsSettingIP4Config o) => o -> m () Source #
Set the value of the “dhcp-vendor-class-identifier
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#dhcpVendorClassIdentifier
constructSettingIP4ConfigDhcpVendorClassIdentifier :: (IsSettingIP4Config o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “dhcp-vendor-class-identifier
” property. This is rarely needed directly, but it is used by new
.
getSettingIP4ConfigDhcpVendorClassIdentifier :: (MonadIO m, IsSettingIP4Config o) => o -> m Text Source #
Get the value of the “dhcp-vendor-class-identifier
” property.
When overloading is enabled, this is equivalent to
get
settingIP4Config #dhcpVendorClassIdentifier
setSettingIP4ConfigDhcpVendorClassIdentifier :: (MonadIO m, IsSettingIP4Config o) => o -> Text -> m () Source #
Set the value of the “dhcp-vendor-class-identifier
” property.
When overloading is enabled, this is equivalent to
set
settingIP4Config [ #dhcpVendorClassIdentifier:=
value ]
linkLocal
Enable and disable the IPv4 link-local configuration independently of the ipv4.method configuration. This allows a link-local address (169.254.x.y/16) to be obtained in addition to other addresses, such as those manually configured or obtained from a DHCP server.
When set to "auto", the value is dependent on "ipv4.method". When set to "default", it honors the global connection default, before falling back to "auto". Note that if "ipv4.method" is "disabled", then link local addressing is always disabled too. The default is "default".
Since: 1.40
constructSettingIP4ConfigLinkLocal :: (IsSettingIP4Config o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “link-local
” property. This is rarely needed directly, but it is used by new
.
getSettingIP4ConfigLinkLocal :: (MonadIO m, IsSettingIP4Config o) => o -> m Int32 Source #
Get the value of the “link-local
” property.
When overloading is enabled, this is equivalent to
get
settingIP4Config #linkLocal
setSettingIP4ConfigLinkLocal :: (MonadIO m, IsSettingIP4Config o) => o -> Int32 -> m () Source #
Set the value of the “link-local
” property.
When overloading is enabled, this is equivalent to
set
settingIP4Config [ #linkLocal:=
value ]