Top |
The NMSettingBridge object is a NMSetting subclass that describes properties necessary for bridging connections.
NMSetting *
nm_setting_bridge_new (void
);
Creates a new NMSettingBridge object with default values.
const char *
nm_setting_bridge_get_mac_address (NMSettingBridge *setting
);
guint16
nm_setting_bridge_get_priority (NMSettingBridge *setting
);
guint16
nm_setting_bridge_get_forward_delay (NMSettingBridge *setting
);
guint16
nm_setting_bridge_get_hello_time (NMSettingBridge *setting
);
guint32
nm_setting_bridge_get_ageing_time (NMSettingBridge *setting
);
guint16
nm_setting_bridge_get_group_forward_mask
(NMSettingBridge *setting
);
Since: 1.10
gboolean
nm_setting_bridge_get_multicast_snooping
(NMSettingBridge *setting
);
Since: 1.2
gboolean
nm_setting_bridge_get_vlan_filtering (NMSettingBridge *setting
);
Since: 1.18
guint16
nm_setting_bridge_get_vlan_default_pvid
(NMSettingBridge *setting
);
Since: 1.18
void nm_setting_bridge_add_vlan (NMSettingBridge *setting
,NMBridgeVlan *vlan
);
Appends a new vlan and associated information to the setting. The given vlan gets sealed and a reference to it is added.
Since: 1.18
guint
nm_setting_bridge_get_num_vlans (NMSettingBridge *setting
);
Since: 1.18
NMBridgeVlan * nm_setting_bridge_get_vlan (NMSettingBridge *setting
,guint idx
);
Since: 1.18
void nm_setting_bridge_remove_vlan (NMSettingBridge *setting
,guint idx
);
Removes the vlan at index idx
.
Since: 1.18
gboolean nm_setting_bridge_remove_vlan_by_vid (NMSettingBridge *setting
,guint16 vid_start
,guint16 vid_end
);
Remove the VLAN with range vid_start
to vid_end
.
If vid_end
is zero, it is assumed to be equal to vid_start
and so the single-id VLAN with id vid_start
is removed.
Since: 1.18
void
nm_setting_bridge_clear_vlans (NMSettingBridge *setting
);
Removes all configured VLANs.
Since: 1.18
NMBridgeVlan * nm_bridge_vlan_new (guint16 vid_start
,guint16 vid_end
);
Creates a new NMBridgeVlan object for the given VLAN id range.
Setting vid_end
to 0 is equivalent to setting it to vid_start
and creates a single-id VLAN.
Since 1.42, ref-counting of NMBridgeVlan is thread-safe.
vid_start |
the start VLAN id, must be between 1 and 4094. |
|
vid_end |
the end VLAN id, must be 0 or between |
Since: 1.18
NMBridgeVlan *
nm_bridge_vlan_ref (NMBridgeVlan *vlan
);
Increases the reference count of the object.
Since: 1.18
void
nm_bridge_vlan_unref (NMBridgeVlan *vlan
);
Decreases the reference count of the object. If the reference count reaches zero the object will be destroyed.
Since 1.42, ref-counting of NMBridgeVlan is thread-safe.
Since: 1.18
NMBridgeVlan *
nm_bridge_vlan_new_clone (const NMBridgeVlan *vlan
);
Since: 1.18
int nm_bridge_vlan_cmp (const NMBridgeVlan *a
,const NMBridgeVlan *b
);
Compare two bridge VLAN objects.
zero of the two instances are equivalent or a non-zero integer otherwise. This defines a total ordering over the VLANs. Whether a VLAN is sealed or not does not affect the comparison.
Since: 1.18
void
nm_bridge_vlan_seal (NMBridgeVlan *vlan
);
Seal the NMBridgeVlan instance. Afterwards, it is a bug
to call all functions that modify the instance (except ref/unref).
A sealed instance cannot be unsealed again, but you can create
an unsealed copy with nm_bridge_vlan_new_clone()
.
Since: 1.18
gboolean
nm_bridge_vlan_is_sealed (const NMBridgeVlan *vlan
);
Since: 1.18
void nm_bridge_vlan_set_untagged (NMBridgeVlan *vlan
,gboolean value
);
Change the value of the untagged property of the VLAN.
Since: 1.18
void nm_bridge_vlan_set_pvid (NMBridgeVlan *vlan
,gboolean value
);
Change the value of the PVID property of the VLAN. It
is invalid to set the value to TRUE
for non-single-id
VLANs.
Since: 1.18
gboolean nm_bridge_vlan_get_vid_range (const NMBridgeVlan *vlan
,guint16 *vid_start
,guint16 *vid_end
);
Gets the VLAN id range.
vlan |
the NMBridgeVlan |
|
vid_start |
location to store the VLAN id range start. |
[out] |
vid_end |
location to store the VLAN id range end. |
[out] |
Since: 1.18
gboolean
nm_bridge_vlan_is_untagged (const NMBridgeVlan *vlan
);
Returns whether the VLAN is untagged.
Since: 1.18
gboolean
nm_bridge_vlan_is_pvid (const NMBridgeVlan *vlan
);
Returns whether the VLAN is the PVID for the port.
Since: 1.18
char * nm_bridge_vlan_to_str (const NMBridgeVlan *vlan
,GError **error
);
Convert a NMBridgeVlan
to a string.
Since: 1.18
NMBridgeVlan * nm_bridge_vlan_from_str (const char *str
,GError **error
);
Parses the string representation of the queueing
discipline to a NMBridgeVlan
instance.
Since: 1.18
const char *
nm_setting_bridge_get_group_address (const NMSettingBridge *setting
);
Since: 1.24
const char *
nm_setting_bridge_get_vlan_protocol (const NMSettingBridge *setting
);
Since: 1.24
gboolean
nm_setting_bridge_get_vlan_stats_enabled
(const NMSettingBridge *setting
);
Since: 1.24
const char *
nm_setting_bridge_get_multicast_router
(const NMSettingBridge *setting
);
Since: 1.24
gboolean
nm_setting_bridge_get_multicast_query_use_ifaddr
(const NMSettingBridge *setting
);
Since: 1.24
gboolean
nm_setting_bridge_get_multicast_querier
(const NMSettingBridge *setting
);
Since: 1.24
guint32
nm_setting_bridge_get_multicast_hash_max
(const NMSettingBridge *setting
);
Since: 1.26
guint32
nm_setting_bridge_get_multicast_last_member_count
(const NMSettingBridge *setting
);
Since: 1.26
guint64
nm_setting_bridge_get_multicast_last_member_interval
(const NMSettingBridge *setting
);
Since: 1.26
guint64
nm_setting_bridge_get_multicast_membership_interval
(const NMSettingBridge *setting
);
Since: 1.26
guint64
nm_setting_bridge_get_multicast_querier_interval
(const NMSettingBridge *setting
);
Since: 1.26
guint64
nm_setting_bridge_get_multicast_query_interval
(const NMSettingBridge *setting
);
Since: 1.26
guint64
nm_setting_bridge_get_multicast_query_response_interval
(const NMSettingBridge *setting
);
Since: 1.26
guint32
nm_setting_bridge_get_multicast_startup_query_count
(const NMSettingBridge *setting
);
Since: 1.26
guint64
nm_setting_bridge_get_multicast_startup_query_interval
(const NMSettingBridge *setting
);
Since: 1.26
#define NM_SETTING_BRIDGE_GROUP_FORWARD_MASK "group-forward-mask"
#define NM_SETTING_BRIDGE_MULTICAST_HASH_MAX "multicast-hash-max"
#define NM_SETTING_BRIDGE_MULTICAST_LAST_MEMBER_COUNT "multicast-last-member-count"
#define NM_SETTING_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL "multicast-last-member-interval"
#define NM_SETTING_BRIDGE_MULTICAST_MEMBERSHIP_INTERVAL "multicast-membership-interval"
#define NM_SETTING_BRIDGE_MULTICAST_SNOOPING "multicast-snooping"
#define NM_SETTING_BRIDGE_MULTICAST_QUERIER_INTERVAL "multicast-querier-interval"
#define NM_SETTING_BRIDGE_MULTICAST_QUERY_INTERVAL "multicast-query-interval"
#define NM_SETTING_BRIDGE_MULTICAST_QUERY_RESPONSE_INTERVAL "multicast-query-response-interval"
#define NM_SETTING_BRIDGE_MULTICAST_QUERY_USE_IFADDR "multicast-query-use-ifaddr"
#define NM_SETTING_BRIDGE_MULTICAST_STARTUP_QUERY_COUNT "multicast-startup-query-count"
#define NM_SETTING_BRIDGE_MULTICAST_STARTUP_QUERY_INTERVAL "multicast-startup-query-interval"
#define NM_SETTING_BRIDGE_VLAN_STATS_ENABLED "vlan-stats-enabled"