gi-nm-1.0.1: NM bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.NM.Objects.SettingVlan

Description

VLAN Settings

Synopsis

Exported types

newtype SettingVlan Source #

Memory-managed wrapper type.

class (GObject o, IsDescendantOf SettingVlan o) => IsSettingVlan o Source #

Type class for types which can be safely cast to SettingVlan, for instance with toSettingVlan.

Instances

Instances details
(GObject o, IsDescendantOf SettingVlan o) => IsSettingVlan o Source # 
Instance details

Defined in GI.NM.Objects.SettingVlan

toSettingVlan :: (MonadIO m, IsSettingVlan o) => o -> m SettingVlan Source #

Cast to SettingVlan, for types for which this is known to be safe. For general casts, use castTo.

Methods

addPriority

settingVlanAddPriority Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> VlanPriorityMap

map: the type of priority map

-> Word32

from: the priority to map to to

-> Word32

to: the priority to map from to

-> m Bool

Returns: True.

Adds a priority mapping to the SettingVlan:ingress_priority_map or SettingVlan:egress_priority_map properties of the setting. If from is already in the given priority map, this function will overwrite the existing entry with the new to.

If map is NM_VLAN_INGRESS_MAP then from is the incoming 802.1q VLAN Priority Code Point (PCP) value, and to is the Linux SKB priority value.

If map is NM_VLAN_EGRESS_MAP then from is the Linux SKB priority value and to is the outgoing 802.1q VLAN Priority Code Point (PCP) value.

addPriorityStr

settingVlanAddPriorityStr Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> VlanPriorityMap

map: the type of priority map

-> Text

str: the string which contains a priority map, like "3:7"

-> m Bool

Returns: True if the entry was successfully added to the list, or it overwrote the old value, False if str is not a valid mapping.

Adds a priority map entry into either the SettingVlan:ingress_priority_map or the SettingVlan:egress_priority_map properties. The priority map maps the Linux SKB priorities to 802.1p priorities.

clearPriorities

settingVlanClearPriorities Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> VlanPriorityMap

map: the type of priority map

-> m () 

Clear all the entries from SettingVlan:ingress_priority_map or SettingVlan:egress_priority_map properties.

getFlags

settingVlanGetFlags Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> m Word32

Returns: the SettingVlan:flags property of the setting

No description available in the introspection data.

getId

settingVlanGetId Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> m Word32

Returns: the SettingVlan:id property of the setting

No description available in the introspection data.

getNumPriorities

settingVlanGetNumPriorities Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> VlanPriorityMap

map: the type of priority map

-> m Int32

Returns: return the number of ingress/egress priority entries.

Returns the number of entries in the SettingVlan:ingress_priority_map or SettingVlan:egress_priority_map properties of this setting.

getParent

settingVlanGetParent Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> m Text

Returns: the SettingVlan:parent property of the setting

No description available in the introspection data.

getPriority

settingVlanGetPriority Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> VlanPriorityMap

map: the type of priority map

-> Word32

idx: the zero-based index of the ingress/egress priority map entry

-> m (Bool, Word32, Word32)

Returns: returns True if idx is in range. Otherwise, False.

Retrieve one of the entries of the SettingVlan:ingress_priority_map or SettingVlan:egress_priority_map properties of this setting.

getProtocol

settingVlanGetProtocol Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> m Text

Returns: the SettingVlan:protocol property of the setting

No description available in the introspection data.

Since: 1.42

new

settingVlanNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m SettingVlan

Returns: the new empty SettingVlan object

Creates a new SettingVlan object with default values.

removePriority

settingVlanRemovePriority Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> VlanPriorityMap

map: the type of priority map

-> Word32

idx: the zero-based index of the priority map to remove

-> m () 

Removes the priority map at index idx from the SettingVlan:ingress_priority_map or SettingVlan:egress_priority_map properties.

removePriorityByValue

settingVlanRemovePriorityByValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> VlanPriorityMap

map: the type of priority map

-> Word32

from: the priority to map to to

-> Word32

to: the priority to map from to

-> m Bool

Returns: True if the priority mapping was found and removed; False if it was not.

Removes the priority map form:to from the SettingVlan:ingress_priority_map or SettingVlan:egress_priority_map (according to map argument) properties.

removePriorityStrByValue

settingVlanRemovePriorityStrByValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingVlan a) 
=> a

setting: the SettingVlan

-> VlanPriorityMap

map: the type of priority map

-> Text

str: the string which contains a priority map, like "3:7"

-> m Bool

Returns: True if the priority mapping was found and removed; False if it was not.

Removes the priority map str from the SettingVlan:ingress_priority_map or SettingVlan:egress_priority_map (according to map argument) properties.

Properties

egressPriorityMap

For outgoing packets, a list of mappings from Linux SKB priorities to 802.1p priorities. The mapping is given in the format "from:to" where both "from" and "to" are unsigned integers, ie "7:3".

clearSettingVlanEgressPriorityMap :: (MonadIO m, IsSettingVlan o) => o -> m () Source #

Set the value of the “egress-priority-map” property to Nothing. When overloading is enabled, this is equivalent to

clear #egressPriorityMap

constructSettingVlanEgressPriorityMap :: (IsSettingVlan o, MonadIO m) => [Text] -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “egress-priority-map” property. This is rarely needed directly, but it is used by new.

getSettingVlanEgressPriorityMap :: (MonadIO m, IsSettingVlan o) => o -> m (Maybe [Text]) Source #

Get the value of the “egress-priority-map” property. When overloading is enabled, this is equivalent to

get settingVlan #egressPriorityMap

setSettingVlanEgressPriorityMap :: (MonadIO m, IsSettingVlan o) => o -> [Text] -> m () Source #

Set the value of the “egress-priority-map” property. When overloading is enabled, this is equivalent to

set settingVlan [ #egressPriorityMap := value ]

flags

One or more flags which control the behavior and features of the VLAN interface. Flags include VlanFlagsReorderHeaders (reordering of output packet headers), VlanFlagsGvrp (use of the GVRP protocol), and VlanFlagsLooseBinding (loose binding of the interface to its controller device's operating state). VlanFlagsMvrp (use of the MVRP protocol).

The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS, but it used to be 0. To preserve backward compatibility, the default-value in the D-Bus API continues to be 0 and a missing property on D-Bus is still considered as 0.

constructSettingVlanFlags :: (IsSettingVlan o, MonadIO m) => [VlanFlags] -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “flags” property. This is rarely needed directly, but it is used by new.

getSettingVlanFlags :: (MonadIO m, IsSettingVlan o) => o -> m [VlanFlags] Source #

Get the value of the “flags” property. When overloading is enabled, this is equivalent to

get settingVlan #flags

setSettingVlanFlags :: (MonadIO m, IsSettingVlan o) => o -> [VlanFlags] -> m () Source #

Set the value of the “flags” property. When overloading is enabled, this is equivalent to

set settingVlan [ #flags := value ]

id

The VLAN identifier that the interface created by this connection should be assigned. The valid range is from 0 to 4094, without the reserved id 4095.

constructSettingVlanId :: (IsSettingVlan o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “id” property. This is rarely needed directly, but it is used by new.

getSettingVlanId :: (MonadIO m, IsSettingVlan o) => o -> m Word32 Source #

Get the value of the “id” property. When overloading is enabled, this is equivalent to

get settingVlan #id

setSettingVlanId :: (MonadIO m, IsSettingVlan o) => o -> Word32 -> m () Source #

Set the value of the “id” property. When overloading is enabled, this is equivalent to

set settingVlan [ #id := value ]

ingressPriorityMap

For incoming packets, a list of mappings from 802.1p priorities to Linux SKB priorities. The mapping is given in the format "from:to" where both "from" and "to" are unsigned integers, ie "7:3".

clearSettingVlanIngressPriorityMap :: (MonadIO m, IsSettingVlan o) => o -> m () Source #

Set the value of the “ingress-priority-map” property to Nothing. When overloading is enabled, this is equivalent to

clear #ingressPriorityMap

constructSettingVlanIngressPriorityMap :: (IsSettingVlan o, MonadIO m) => [Text] -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “ingress-priority-map” property. This is rarely needed directly, but it is used by new.

getSettingVlanIngressPriorityMap :: (MonadIO m, IsSettingVlan o) => o -> m (Maybe [Text]) Source #

Get the value of the “ingress-priority-map” property. When overloading is enabled, this is equivalent to

get settingVlan #ingressPriorityMap

setSettingVlanIngressPriorityMap :: (MonadIO m, IsSettingVlan o) => o -> [Text] -> m () Source #

Set the value of the “ingress-priority-map” property. When overloading is enabled, this is equivalent to

set settingVlan [ #ingressPriorityMap := value ]

parent

If given, specifies the parent interface name or parent connection UUID from which this VLAN interface should be created. If this property is not specified, the connection must contain an SettingWired setting with a SettingWired:macAddress property.

clearSettingVlanParent :: (MonadIO m, IsSettingVlan o) => o -> m () Source #

Set the value of the “parent” property to Nothing. When overloading is enabled, this is equivalent to

clear #parent

constructSettingVlanParent :: (IsSettingVlan o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “parent” property. This is rarely needed directly, but it is used by new.

getSettingVlanParent :: (MonadIO m, IsSettingVlan o) => o -> m Text Source #

Get the value of the “parent” property. When overloading is enabled, this is equivalent to

get settingVlan #parent

setSettingVlanParent :: (MonadIO m, IsSettingVlan o) => o -> Text -> m () Source #

Set the value of the “parent” property. When overloading is enabled, this is equivalent to

set settingVlan [ #parent := value ]

protocol

Specifies the VLAN protocol to use for encapsulation.

Supported values are: '802.1Q', '802.1ad'. If not specified the default value is '802.1Q'.

Since: 1.42

clearSettingVlanProtocol :: (MonadIO m, IsSettingVlan o) => o -> m () Source #

Set the value of the “protocol” property to Nothing. When overloading is enabled, this is equivalent to

clear #protocol

constructSettingVlanProtocol :: (IsSettingVlan o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “protocol” property. This is rarely needed directly, but it is used by new.

getSettingVlanProtocol :: (MonadIO m, IsSettingVlan o) => o -> m Text Source #

Get the value of the “protocol” property. When overloading is enabled, this is equivalent to

get settingVlan #protocol

setSettingVlanProtocol :: (MonadIO m, IsSettingVlan o) => o -> Text -> m () Source #

Set the value of the “protocol” property. When overloading is enabled, this is equivalent to

set settingVlan [ #protocol := value ]