mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 16:20:05 +01:00
NetworkManager is now able to configure veth interfaces throught the NMSettingVeth. Veth interfaces only have "peer" property. In order to support Veth interfaces in NetworkManager the design need to pass the following requirements: * Veth setting only has "peer" attribute. * Ethernet profiles must be applicable to Veth interfaces. * When creating a veth interface, the peer will be managed by NetworkManager but will not have a profile. * Veth connection can reapply only if the peer has not been modified. * In order to modify the veth peer, NetworkManager must deactivate the connection and create a new one with peer modified. In general, it should support the basis of veth interfaces but without breaking any existing feature or use case. The users that are using veth interfaces as ethernet should not notice anything changed unless they specified the veth peer setting. Creating a Veth interface in NetworkManager is useful even without the support for namespaces for some use cases, e.g "connecting one side of the veth to an OVS bridge and the other side to a Linux bridge" this is done when using OVN kubernetes [1][2]. In addition, it would provide persistent configuration and rollback support for Veth interfaces. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1885605 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1894139 Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/* SPDX-License-Identifier: LGPL-2.1+ */
|
|
/*
|
|
* Copyright (C) 2020 Red Hat, Inc.
|
|
*/
|
|
|
|
#ifndef __NM_SETTING_VETH_H__
|
|
#define __NM_SETTING_VETH_H__
|
|
|
|
#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION)
|
|
#error "Only <NetworkManager.h> can be included directly."
|
|
#endif
|
|
|
|
#include "nm-setting.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define NM_TYPE_SETTING_VETH (nm_setting_veth_get_type())
|
|
#define NM_SETTING_VETH(obj) \
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_VETH, NMSettingVeth))
|
|
#define NM_IS_SETTING_VETH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_VETH))
|
|
#define NM_IS_SETTING_VETH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_VETH))
|
|
#define NM_SETTING_VETH_GET_CLASS(obj) \
|
|
(G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_VETH, NMSettingVethClass))
|
|
|
|
#define NM_SETTING_VETH_SETTING_NAME "veth"
|
|
|
|
#define NM_SETTING_VETH_PEER "peer"
|
|
|
|
typedef struct _NMSettingVethClass NMSettingVethClass;
|
|
|
|
NM_AVAILABLE_IN_1_30
|
|
GType nm_setting_veth_get_type(void);
|
|
NM_AVAILABLE_IN_1_30
|
|
NMSetting *nm_setting_veth_new(void);
|
|
|
|
NM_AVAILABLE_IN_1_30
|
|
const char *nm_setting_veth_get_peer(NMSettingVeth *setting);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __NM_SETTING_VETH_H__ */
|