Top |
GStrv | egress-priority-map | Read / Write |
NMVlanFlags | flags | Read / Write |
guint | id | Read / Write |
GStrv | ingress-priority-map | Read / Write |
char * | parent | Read / Write |
#define | NM_SETTING_VLAN_SETTING_NAME |
#define | NM_SETTING_VLAN_PARENT |
#define | NM_SETTING_VLAN_ID |
#define | NM_SETTING_VLAN_FLAGS |
#define | NM_SETTING_VLAN_INGRESS_PRIORITY_MAP |
#define | NM_SETTING_VLAN_EGRESS_PRIORITY_MAP |
NMSettingVlan | |
enum | NMVlanPriorityMap |
enum | NMVlanFlags |
#define | NM_VLAN_FLAGS_ALL |
GEnum ╰── NMVlanPriorityMap GFlags ╰── NMVlanFlags GObject ╰── NMSetting ╰── NMSettingVlan
The NMSettingVlan object is a NMSetting subclass that describes properties necessary for connection to VLAN interfaces.
NMSetting *
nm_setting_vlan_new (void
);
Creates a new NMSettingVlan object with default values.
gint32 nm_setting_vlan_get_num_priorities (NMSettingVlan *setting
,NMVlanPriorityMap map
);
Returns the number of entries in the “ingress_priority_map” or “egress_priority_map” properties of this setting.
gboolean nm_setting_vlan_get_priority (NMSettingVlan *setting
,NMVlanPriorityMap map
,guint32 idx
,guint32 *out_from
,guint32 *out_to
);
Retrieve one of the entries of the “ingress_priority_map” or “egress_priority_map” properties of this setting.
setting |
the NMSettingVlan |
|
map |
the type of priority map |
|
idx |
the zero-based index of the ingress/egress priority map entry |
|
out_from |
on return the value of the priority map's 'from' item. |
[out][allow-none] |
out_to |
on return the value of priority map's 'to' item. |
[out][allow-none] |
gboolean nm_setting_vlan_add_priority (NMSettingVlan *setting
,NMVlanPriorityMap map
,guint32 from
,guint32 to
);
Adds a priority mapping to the “ingress_priority_map” or
“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.
setting |
the NMSettingVlan |
|
map |
the type of priority map |
|
from |
the priority to map to |
|
to |
the priority to map |
void nm_setting_vlan_remove_priority (NMSettingVlan *setting
,NMVlanPriorityMap map
,guint32 idx
);
Removes the priority map at index idx
from the
“ingress_priority_map” or “egress_priority_map”
properties.
setting |
the NMSettingVlan |
|
map |
the type of priority map |
|
idx |
the zero-based index of the priority map to remove |
gboolean nm_setting_vlan_remove_priority_by_value (NMSettingVlan *setting
,NMVlanPriorityMap map
,guint32 from
,guint32 to
);
Removes the priority map form
:to
from the “ingress_priority_map”
or “egress_priority_map” (according to map
argument)
properties.
setting |
the NMSettingVlan |
|
map |
the type of priority map |
|
from |
the priority to map to |
|
to |
the priority to map |
gboolean nm_setting_vlan_remove_priority_str_by_value (NMSettingVlan *setting
,NMVlanPriorityMap map
,const char *str
);
Removes the priority map str
from the “ingress_priority_map”
or “egress_priority_map” (according to map
argument)
properties.
setting |
the NMSettingVlan |
|
map |
the type of priority map |
|
str |
the string which contains a priority map, like "3:7" |
void nm_setting_vlan_clear_priorities (NMSettingVlan *setting
,NMVlanPriorityMap map
);
Clear all the entries from “ingress_priority_map” or “egress_priority_map” properties.
gboolean nm_setting_vlan_add_priority_str (NMSettingVlan *setting
,NMVlanPriorityMap map
,const char *str
);
Adds a priority map entry into either the “ingress_priority_map” or the “egress_priority_map” properties. The priority map maps the Linux SKB priorities to 802.1p priorities.
setting |
the NMSettingVlan |
|
map |
the type of priority map |
|
str |
the string which contains a priority map, like "3:7" |
#define NM_SETTING_VLAN_INGRESS_PRIORITY_MAP "ingress-priority-map"
#define NM_SETTING_VLAN_EGRESS_PRIORITY_MAP "egress-priority-map"
A selector for traffic priority maps; these map Linux SKB priorities to 802.1p priorities used in VLANs.
NMVlanFlags values control the behavior of the VLAN interface.
indicates that this interface should reorder outgoing packet headers to look more like a non-VLAN Ethernet interface |
||
indicates that this interface should use GVRP to register itself with its switch |
||
indicates that this interface's operating state is tied to the underlying network interface but other details (like routing) are not. |
||
indicates that this interface should use MVRP to register itself with its switch |
“egress-priority-map”
property“egress-priority-map” GStrv
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".
Owner: NMSettingVlan
Flags: Read / Write
“flags”
property“flags” NMVlanFlags
One or more flags which control the behavior and features of the VLAN
interface. Flags include NM_VLAN_FLAG_REORDER_HEADERS
(reordering of
output packet headers), NM_VLAN_FLAG_GVRP
(use of the GVRP protocol),
and NM_VLAN_FLAG_LOOSE_BINDING
(loose binding of the interface to its
master device's operating state). NM_VLAN_FLAG_MVRP
(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.
Owner: NMSettingVlan
Flags: Read / Write
Default value: NM_VLAN_FLAG_REORDER_HEADERS
“id”
property“id” guint
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.
Owner: NMSettingVlan
Flags: Read / Write
Allowed values: <= 4095
Default value: 0
“ingress-priority-map”
property“ingress-priority-map” GStrv
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".
Owner: NMSettingVlan
Flags: Read / Write
“parent”
property “parent” char *
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 NMSettingWired setting with a “mac-address” property.
Owner: NMSettingVlan
Flags: Read / Write
Default value: NULL