diff options
| author | Michael Biebl <biebl@debian.org> | 2025-02-12 13:46:50 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2025-02-12 13:46:50 +0100 |
| commit | 8bdf070ff046f482f6eb5e2b15ebc216f5d1e3da (patch) | |
| tree | f706478d189d54c6532e8863d4b0d5ff5575af60 /src/libnm-core-public | |
| parent | 818258cf34b83fbc754633295e1052d4752d7b15 (diff) | |
New upstream version 1.51.90 upstream/1.51.90
Diffstat (limited to 'src/libnm-core-public')
| -rw-r--r-- | src/libnm-core-public/meson.build | 1 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-core-types.h | 1 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-dbus-interface.h | 3 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-setting-connection.h | 89 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-setting-ethtool.h | 27 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-setting-gsm.h | 55 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-setting-ip-config.h | 84 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-setting-ip4-config.h | 27 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-setting-ipvlan.h | 69 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-version-macros.h.in | 1 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-version.h | 14 | ||||
| -rw-r--r-- | src/libnm-core-public/nm-vpn-editor-plugin.h | 24 |
12 files changed, 309 insertions, 86 deletions
diff --git a/src/libnm-core-public/meson.build b/src/libnm-core-public/meson.build index b5ed71e8..97888467 100644 --- a/src/libnm-core-public/meson.build +++ b/src/libnm-core-public/meson.build @@ -30,6 +30,7 @@ libnm_core_headers = files( 'nm-setting-ip-tunnel.h', 'nm-setting-ip4-config.h', 'nm-setting-ip6-config.h', + 'nm-setting-ipvlan.h', 'nm-setting-link.h', 'nm-setting-loopback.h', 'nm-setting-macsec.h', diff --git a/src/libnm-core-public/nm-core-types.h b/src/libnm-core-public/nm-core-types.h index d9a8225e..a0d6bc82 100644 --- a/src/libnm-core-public/nm-core-types.h +++ b/src/libnm-core-public/nm-core-types.h @@ -35,6 +35,7 @@ typedef struct _NMSettingIP4Config NMSettingIP4Config; typedef struct _NMSettingIP6Config NMSettingIP6Config; typedef struct _NMSettingIPConfig NMSettingIPConfig; typedef struct _NMSettingIPTunnel NMSettingIPTunnel; +typedef struct _NMSettingIpvlan NMSettingIpvlan; typedef struct _NMSettingInfiniband NMSettingInfiniband; typedef struct _NMSettingLink NMSettingLink; typedef struct _NMSettingLoopback NMSettingLoopback; diff --git a/src/libnm-core-public/nm-dbus-interface.h b/src/libnm-core-public/nm-dbus-interface.h index 9c737dbe..d6267610 100644 --- a/src/libnm-core-public/nm-dbus-interface.h +++ b/src/libnm-core-public/nm-dbus-interface.h @@ -40,6 +40,7 @@ #define NM_DBUS_INTERFACE_DEVICE_HSR NM_DBUS_INTERFACE_DEVICE ".Hsr" #define NM_DBUS_INTERFACE_DEVICE_INFINIBAND NM_DBUS_INTERFACE_DEVICE ".Infiniband" #define NM_DBUS_INTERFACE_DEVICE_IP_TUNNEL NM_DBUS_INTERFACE_DEVICE ".IPTunnel" +#define NM_DBUS_INTERFACE_DEVICE_IPVLAN NM_DBUS_INTERFACE_DEVICE ".Ipvlan" #define NM_DBUS_INTERFACE_DEVICE_LOOPBACK NM_DBUS_INTERFACE_DEVICE ".Loopback" #define NM_DBUS_INTERFACE_DEVICE_MACSEC NM_DBUS_INTERFACE_DEVICE ".Macsec" #define NM_DBUS_INTERFACE_DEVICE_MACVLAN NM_DBUS_INTERFACE_DEVICE ".Macvlan" @@ -239,6 +240,7 @@ typedef enum { * @NM_DEVICE_TYPE_VRF: A VRF (Virtual Routing and Forwarding) interface. Since: 1.24. * @NM_DEVICE_TYPE_LOOPBACK: a loopback interface. Since: 1.42. * @NM_DEVICE_TYPE_HSR: A HSR/PRP device. Since: 1.46. + * @NM_DEVICE_TYPE_IPVLAN: A IPVLAN device. Since: 1.52. * * #NMDeviceType values indicate the type of hardware represented by a * device object. @@ -278,6 +280,7 @@ typedef enum { NM_DEVICE_TYPE_VRF = 31, NM_DEVICE_TYPE_LOOPBACK = 32, NM_DEVICE_TYPE_HSR = 33, + NM_DEVICE_TYPE_IPVLAN = 34, } NMDeviceType; /** diff --git a/src/libnm-core-public/nm-setting-connection.h b/src/libnm-core-public/nm-setting-connection.h index 4cf67346..6547c5be 100644 --- a/src/libnm-core-public/nm-setting-connection.h +++ b/src/libnm-core-public/nm-setting-connection.h @@ -33,38 +33,41 @@ G_BEGIN_DECLS #define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_MAX 999 #define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_DEFAULT 0 -#define NM_SETTING_CONNECTION_ID "id" -#define NM_SETTING_CONNECTION_UUID "uuid" -#define NM_SETTING_CONNECTION_STABLE_ID "stable-id" -#define NM_SETTING_CONNECTION_INTERFACE_NAME "interface-name" -#define NM_SETTING_CONNECTION_TYPE "type" -#define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect" -#define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY "autoconnect-priority" -#define NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES "autoconnect-retries" -#define NM_SETTING_CONNECTION_MULTI_CONNECT "multi-connect" -#define NM_SETTING_CONNECTION_TIMESTAMP "timestamp" -#define NM_SETTING_CONNECTION_READ_ONLY "read-only" -#define NM_SETTING_CONNECTION_PERMISSIONS "permissions" -#define NM_SETTING_CONNECTION_ZONE "zone" -#define NM_SETTING_CONNECTION_MASTER "master" -#define NM_SETTING_CONNECTION_CONTROLLER "controller" -#define NM_SETTING_CONNECTION_SLAVE_TYPE "slave-type" -#define NM_SETTING_CONNECTION_PORT_TYPE "port-type" -#define NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES "autoconnect-slaves" -#define NM_SETTING_CONNECTION_AUTOCONNECT_PORTS "autoconnect-ports" -#define NM_SETTING_CONNECTION_SECONDARIES "secondaries" -#define NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT "gateway-ping-timeout" -#define NM_SETTING_CONNECTION_METERED "metered" -#define NM_SETTING_CONNECTION_LLDP "lldp" -#define NM_SETTING_CONNECTION_AUTH_RETRIES "auth-retries" -#define NM_SETTING_CONNECTION_MDNS "mdns" -#define NM_SETTING_CONNECTION_LLMNR "llmnr" -#define NM_SETTING_CONNECTION_DNS_OVER_TLS "dns-over-tls" -#define NM_SETTING_CONNECTION_MPTCP_FLAGS "mptcp-flags" -#define NM_SETTING_CONNECTION_WAIT_DEVICE_TIMEOUT "wait-device-timeout" -#define NM_SETTING_CONNECTION_MUD_URL "mud-url" -#define NM_SETTING_CONNECTION_WAIT_ACTIVATION_DELAY "wait-activation-delay" -#define NM_SETTING_CONNECTION_DOWN_ON_POWEROFF "down-on-poweroff" +#define NM_SETTING_CONNECTION_ID "id" +#define NM_SETTING_CONNECTION_UUID "uuid" +#define NM_SETTING_CONNECTION_STABLE_ID "stable-id" +#define NM_SETTING_CONNECTION_INTERFACE_NAME "interface-name" +#define NM_SETTING_CONNECTION_TYPE "type" +#define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect" +#define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY "autoconnect-priority" +#define NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES "autoconnect-retries" +#define NM_SETTING_CONNECTION_MULTI_CONNECT "multi-connect" +#define NM_SETTING_CONNECTION_TIMESTAMP "timestamp" +#define NM_SETTING_CONNECTION_READ_ONLY "read-only" +#define NM_SETTING_CONNECTION_PERMISSIONS "permissions" +#define NM_SETTING_CONNECTION_ZONE "zone" +#define NM_SETTING_CONNECTION_MASTER "master" +#define NM_SETTING_CONNECTION_CONTROLLER "controller" +#define NM_SETTING_CONNECTION_SLAVE_TYPE "slave-type" +#define NM_SETTING_CONNECTION_PORT_TYPE "port-type" +#define NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES "autoconnect-slaves" +#define NM_SETTING_CONNECTION_AUTOCONNECT_PORTS "autoconnect-ports" +#define NM_SETTING_CONNECTION_SECONDARIES "secondaries" +#define NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT "gateway-ping-timeout" +#define NM_SETTING_CONNECTION_METERED "metered" +#define NM_SETTING_CONNECTION_LLDP "lldp" +#define NM_SETTING_CONNECTION_AUTH_RETRIES "auth-retries" +#define NM_SETTING_CONNECTION_MDNS "mdns" +#define NM_SETTING_CONNECTION_LLMNR "llmnr" +#define NM_SETTING_CONNECTION_DNS_OVER_TLS "dns-over-tls" +#define NM_SETTING_CONNECTION_MPTCP_FLAGS "mptcp-flags" +#define NM_SETTING_CONNECTION_WAIT_DEVICE_TIMEOUT "wait-device-timeout" +#define NM_SETTING_CONNECTION_MUD_URL "mud-url" +#define NM_SETTING_CONNECTION_WAIT_ACTIVATION_DELAY "wait-activation-delay" +#define NM_SETTING_CONNECTION_DOWN_ON_POWEROFF "down-on-poweroff" +#define NM_SETTING_CONNECTION_IP_PING_TIMEOUT "ip-ping-timeout" +#define NM_SETTING_CONNECTION_IP_PING_ADDRESSES "ip-ping-addresses" +#define NM_SETTING_CONNECTION_IP_PING_ADDRESSES_REQUIRE_ALL "ip-ping-addresses-require-all" /* Types for property values */ /** @@ -279,6 +282,28 @@ nm_setting_connection_get_down_on_poweroff(NMSettingConnection *setting); NM_AVAILABLE_IN_1_26 const char *nm_setting_connection_get_mud_url(NMSettingConnection *setting); +NM_AVAILABLE_IN_1_52 +guint32 nm_setting_connection_get_ip_ping_timeout(NMSettingConnection *setting); + +NM_AVAILABLE_IN_1_52 +const char *nm_setting_connection_get_ip_ping_address(NMSettingConnection *setting, guint32 idx); + +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_connection_add_ip_ping_address(NMSettingConnection *setting, + const char *address); +NM_AVAILABLE_IN_1_52 +void nm_setting_connection_remove_ip_ping_address(NMSettingConnection *setting, guint32 idx); + +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_connection_remove_ip_ping_address_by_value(NMSettingConnection *setting, + const char *address); + +NM_AVAILABLE_IN_1_52 +void nm_setting_connection_clear_ip_ping_addresses(NMSettingConnection *setting); + +NM_AVAILABLE_IN_1_52 +NMTernary nm_setting_connection_get_ip_ping_addresses_require_all(NMSettingConnection *setting); + G_END_DECLS #endif /* __NM_SETTING_CONNECTION_H__ */ diff --git a/src/libnm-core-public/nm-setting-ethtool.h b/src/libnm-core-public/nm-setting-ethtool.h index fe1fbc0e..867bb0f2 100644 --- a/src/libnm-core-public/nm-setting-ethtool.h +++ b/src/libnm-core-public/nm-setting-ethtool.h @@ -32,6 +32,9 @@ gboolean nm_ethtool_optname_is_channels(const char *optname); NM_AVAILABLE_IN_1_46 gboolean nm_ethtool_optname_is_eee(const char *optname); +NM_AVAILABLE_IN_1_52 +gboolean nm_ethtool_optname_is_fec(const char *optname); + /*****************************************************************************/ #define NM_TYPE_SETTING_ETHTOOL (nm_setting_ethtool_get_type()) @@ -74,6 +77,30 @@ NM_AVAILABLE_IN_1_14 NM_DEPRECATED_IN_1_26 void nm_setting_ethtool_clear_features(NMSettingEthtool *setting); +/** + * NMSettingEthtoolFecMode: + * @NM_SETTING_ETHTOOL_FEC_MODE_NONE: FEC mode configuration is not supported. + * @NM_SETTING_ETHTOOL_FEC_MODE_AUTO: Select default/best FEC mode automatically. + * @NM_SETTING_ETHTOOL_FEC_MODE_OFF: No FEC mode. + * @NM_SETTING_ETHTOOL_FEC_MODE_RS: Reed-Solomon FEC Mode. + * @NM_SETTING_ETHTOOL_FEC_MODE_BASER: Base-R/Reed-Solomon FEC Mode. + * @NM_SETTING_ETHTOOL_FEC_MODE_LLRS: Low Latency Reed Solomon FEC Mode. + * + * These flags modify the ethtool FEC(Forward Error Correction) mode. + * + * Since: 1.52 + **/ +typedef enum { /*< flags >*/ + NM_SETTING_ETHTOOL_FEC_MODE_NONE = 1 << 0, /*< skip >*/ + NM_SETTING_ETHTOOL_FEC_MODE_AUTO = 1 << 1, + NM_SETTING_ETHTOOL_FEC_MODE_OFF = 1 << 2, + NM_SETTING_ETHTOOL_FEC_MODE_RS = 1 << 3, + NM_SETTING_ETHTOOL_FEC_MODE_BASER = 1 << 4, + NM_SETTING_ETHTOOL_FEC_MODE_LLRS = 1 << 5, + /* New constant should align with linux/ethtool.h ETHTOOL_FEC_XXX */ + _NM_SETTING_ETHTOOL_FEC_MODE_LAST = NM_SETTING_ETHTOOL_FEC_MODE_LLRS, /*< skip >*/ +} NMSettingEthtoolFecMode; + G_END_DECLS #endif /* __NM_SETTING_ETHTOOL_H__ */ diff --git a/src/libnm-core-public/nm-setting-gsm.h b/src/libnm-core-public/nm-setting-gsm.h index dd5b0b26..c8663502 100644 --- a/src/libnm-core-public/nm-setting-gsm.h +++ b/src/libnm-core-public/nm-setting-gsm.h @@ -26,21 +26,30 @@ G_BEGIN_DECLS #define NM_SETTING_GSM_SETTING_NAME "gsm" -#define NM_SETTING_GSM_AUTO_CONFIG "auto-config" -#define NM_SETTING_GSM_USERNAME "username" -#define NM_SETTING_GSM_PASSWORD "password" -#define NM_SETTING_GSM_PASSWORD_FLAGS "password-flags" -#define NM_SETTING_GSM_APN "apn" -#define NM_SETTING_GSM_NETWORK_ID "network-id" -#define NM_SETTING_GSM_PIN "pin" -#define NM_SETTING_GSM_PIN_FLAGS "pin-flags" -#define NM_SETTING_GSM_HOME_ONLY "home-only" -#define NM_SETTING_GSM_DEVICE_ID "device-id" -#define NM_SETTING_GSM_SIM_ID "sim-id" -#define NM_SETTING_GSM_SIM_OPERATOR_ID "sim-operator-id" -#define NM_SETTING_GSM_MTU "mtu" -#define NM_SETTING_GSM_INITIAL_EPS_BEARER_CONFIGURE "initial-eps-bearer-configure" -#define NM_SETTING_GSM_INITIAL_EPS_BEARER_APN "initial-eps-bearer-apn" +#define NM_SETTING_GSM_AUTO_CONFIG "auto-config" +#define NM_SETTING_GSM_USERNAME "username" +#define NM_SETTING_GSM_PASSWORD "password" +#define NM_SETTING_GSM_PASSWORD_FLAGS "password-flags" +#define NM_SETTING_GSM_APN "apn" +#define NM_SETTING_GSM_NETWORK_ID "network-id" +#define NM_SETTING_GSM_PIN "pin" +#define NM_SETTING_GSM_PIN_FLAGS "pin-flags" +#define NM_SETTING_GSM_HOME_ONLY "home-only" +#define NM_SETTING_GSM_DEVICE_ID "device-id" +#define NM_SETTING_GSM_SIM_ID "sim-id" +#define NM_SETTING_GSM_SIM_OPERATOR_ID "sim-operator-id" +#define NM_SETTING_GSM_MTU "mtu" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_CONFIGURE "initial-eps-bearer-configure" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_APN "initial-eps-bearer-apn" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_USERNAME "initial-eps-bearer-username" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_PASSWORD "initial-eps-bearer-password" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_PASSWORD_FLAGS "initial-eps-bearer-password-flags" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_NOAUTH "initial-eps-bearer-noauth" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_EAP "initial-eps-bearer-refuse-eap" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_PAP "initial-eps-bearer-refuse-pap" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_CHAP "initial-eps-bearer-refuse-chap" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_MSCHAP "initial-eps-bearer-refuse-mschap" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_MSCHAPV2 "initial-eps-bearer-refuse-mschapv2" /* Deprecated */ #define NM_SETTING_GSM_NUMBER "number" @@ -73,6 +82,22 @@ NM_AVAILABLE_IN_1_44 gboolean nm_setting_gsm_get_initial_eps_config(NMSettingGsm *setting); NM_AVAILABLE_IN_1_44 const char *nm_setting_gsm_get_initial_eps_apn(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +const char *nm_setting_gsm_get_initial_eps_username(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +const char *nm_setting_gsm_get_initial_eps_password(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_noauth(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_refuse_eap(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_refuse_pap(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_refuse_chap(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_refuse_mschap(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_refuse_mschapv2(NMSettingGsm *setting); NM_DEPRECATED_IN_1_16 const char *nm_setting_gsm_get_number(NMSettingGsm *setting); diff --git a/src/libnm-core-public/nm-setting-ip-config.h b/src/libnm-core-public/nm-setting-ip-config.h index 3b732882..f0a29f14 100644 --- a/src/libnm-core-public/nm-setting-ip-config.h +++ b/src/libnm-core-public/nm-setting-ip-config.h @@ -36,6 +36,23 @@ typedef enum /*< flags >*/ { NM_IP_ADDRESS_CMP_FLAGS_WITH_ATTRS = 0x1, } NMIPAddressCmpFlags; +/** + * NMSettingIPConfigRoutedDns: + * @NM_SETTING_IP_CONFIG_ROUTED_DNS_DEFAULT: use the global default value + * @NM_SETTING_IP_CONFIG_ROUTED_DNS_NO: do not add DNS routes + * @NM_SETTING_IP_CONFIG_ROUTED_DNS_YES: do add DNS routes + * + * #NMSettingIPConfigRoutedDns indicates whether routes are added + * automatically for each DNS that is associated with this connection. + * + * Since: 1.52 + */ +typedef enum { + NM_SETTING_IP_CONFIG_ROUTED_DNS_DEFAULT = -1, + NM_SETTING_IP_CONFIG_ROUTED_DNS_NO = 0, + NM_SETTING_IP_CONFIG_ROUTED_DNS_YES = 1, +} NMSettingIPConfigRoutedDns; + typedef struct NMIPAddress NMIPAddress; GType nm_ip_address_get_type(void); @@ -317,32 +334,36 @@ char *nm_ip_routing_rule_to_string(const NMIPRoutingRule *self, #define NM_SETTING_IP_CONFIG_DAD_TIMEOUT_MAX 30000 -#define NM_SETTING_IP_CONFIG_METHOD "method" -#define NM_SETTING_IP_CONFIG_DNS "dns" -#define NM_SETTING_IP_CONFIG_DNS_SEARCH "dns-search" -#define NM_SETTING_IP_CONFIG_DNS_OPTIONS "dns-options" -#define NM_SETTING_IP_CONFIG_DNS_PRIORITY "dns-priority" -#define NM_SETTING_IP_CONFIG_ADDRESSES "addresses" -#define NM_SETTING_IP_CONFIG_GATEWAY "gateway" -#define NM_SETTING_IP_CONFIG_ROUTES "routes" -#define NM_SETTING_IP_CONFIG_ROUTE_METRIC "route-metric" -#define NM_SETTING_IP_CONFIG_ROUTE_TABLE "route-table" -#define NM_SETTING_IP_CONFIG_IGNORE_AUTO_ROUTES "ignore-auto-routes" -#define NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS "ignore-auto-dns" -#define NM_SETTING_IP_CONFIG_DHCP_HOSTNAME "dhcp-hostname" -#define NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME "dhcp-send-hostname" -#define NM_SETTING_IP_CONFIG_DHCP_HOSTNAME_FLAGS "dhcp-hostname-flags" -#define NM_SETTING_IP_CONFIG_DHCP_DSCP "dhcp-dscp" -#define NM_SETTING_IP_CONFIG_NEVER_DEFAULT "never-default" -#define NM_SETTING_IP_CONFIG_MAY_FAIL "may-fail" -#define NM_SETTING_IP_CONFIG_DAD_TIMEOUT "dad-timeout" -#define NM_SETTING_IP_CONFIG_DHCP_TIMEOUT "dhcp-timeout" -#define NM_SETTING_IP_CONFIG_REQUIRED_TIMEOUT "required-timeout" -#define NM_SETTING_IP_CONFIG_DHCP_IAID "dhcp-iaid" -#define NM_SETTING_IP_CONFIG_DHCP_REJECT_SERVERS "dhcp-reject-servers" -#define NM_SETTING_IP_CONFIG_AUTO_ROUTE_EXT_GW "auto-route-ext-gw" -#define NM_SETTING_IP_CONFIG_REPLACE_LOCAL_RULE "replace-local-rule" -#define NM_SETTING_IP_CONFIG_DHCP_SEND_RELEASE "dhcp-send-release" +#define NM_SETTING_IP_CONFIG_METHOD "method" +#define NM_SETTING_IP_CONFIG_DNS "dns" +#define NM_SETTING_IP_CONFIG_DNS_SEARCH "dns-search" +#define NM_SETTING_IP_CONFIG_DNS_OPTIONS "dns-options" +#define NM_SETTING_IP_CONFIG_DNS_PRIORITY "dns-priority" +#define NM_SETTING_IP_CONFIG_ADDRESSES "addresses" +#define NM_SETTING_IP_CONFIG_GATEWAY "gateway" +#define NM_SETTING_IP_CONFIG_ROUTES "routes" +#define NM_SETTING_IP_CONFIG_ROUTE_METRIC "route-metric" +#define NM_SETTING_IP_CONFIG_ROUTE_TABLE "route-table" +#define NM_SETTING_IP_CONFIG_IGNORE_AUTO_ROUTES "ignore-auto-routes" +#define NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS "ignore-auto-dns" +#define NM_SETTING_IP_CONFIG_DHCP_HOSTNAME "dhcp-hostname" +#define NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME "dhcp-send-hostname" +#define NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME_V2 "dhcp-send-hostname-v2" +#define NM_SETTING_IP_CONFIG_DHCP_HOSTNAME_FLAGS "dhcp-hostname-flags" +#define NM_SETTING_IP_CONFIG_DHCP_DSCP "dhcp-dscp" +#define NM_SETTING_IP_CONFIG_NEVER_DEFAULT "never-default" +#define NM_SETTING_IP_CONFIG_MAY_FAIL "may-fail" +#define NM_SETTING_IP_CONFIG_DAD_TIMEOUT "dad-timeout" +#define NM_SETTING_IP_CONFIG_DHCP_TIMEOUT "dhcp-timeout" +#define NM_SETTING_IP_CONFIG_REQUIRED_TIMEOUT "required-timeout" +#define NM_SETTING_IP_CONFIG_DHCP_IAID "dhcp-iaid" +#define NM_SETTING_IP_CONFIG_DHCP_REJECT_SERVERS "dhcp-reject-servers" +#define NM_SETTING_IP_CONFIG_AUTO_ROUTE_EXT_GW "auto-route-ext-gw" +#define NM_SETTING_IP_CONFIG_REPLACE_LOCAL_RULE "replace-local-rule" +#define NM_SETTING_IP_CONFIG_DHCP_SEND_RELEASE "dhcp-send-release" +#define NM_SETTING_IP_CONFIG_ROUTED_DNS "routed-dns" +#define NM_SETTING_IP_CONFIG_SHARED_DHCP_RANGE "shared-dhcp-range" +#define NM_SETTING_IP_CONFIG_SHARED_DHCP_LEASE_TIME "shared-dhcp-lease-time" /* these are not real GObject properties. */ #define NM_SETTING_IP_CONFIG_ROUTING_RULES "routing-rules" @@ -479,7 +500,8 @@ gboolean nm_setting_ip_config_get_ignore_auto_routes(NMSettingIPConfig *setting) gboolean nm_setting_ip_config_get_ignore_auto_dns(NMSettingIPConfig *setting); const char *nm_setting_ip_config_get_dhcp_hostname(NMSettingIPConfig *setting); -gboolean nm_setting_ip_config_get_dhcp_send_hostname(NMSettingIPConfig *setting); +NM_DEPRECATED_IN_1_52 +gboolean nm_setting_ip_config_get_dhcp_send_hostname(NMSettingIPConfig *setting); NM_AVAILABLE_IN_1_46 const char *nm_setting_ip_config_get_dhcp_dscp(NMSettingIPConfig *setting); @@ -512,6 +534,14 @@ NM_AVAILABLE_IN_1_44 NMTernary nm_setting_ip_config_get_replace_local_rule(NMSettingIPConfig *setting); NM_AVAILABLE_IN_1_48 NMTernary nm_setting_ip_config_get_dhcp_send_release(NMSettingIPConfig *setting); +NM_AVAILABLE_IN_1_52 +NMSettingIPConfigRoutedDns nm_setting_ip_config_get_routed_dns(NMSettingIPConfig *setting); +NM_AVAILABLE_IN_1_52 +NMTernary nm_setting_ip_config_get_dhcp_send_hostname_v2(NMSettingIPConfig *setting); +NM_AVAILABLE_IN_1_52 +const char *nm_setting_ip_config_get_shared_dhcp_range(NMSettingIPConfig *setting); +NM_AVAILABLE_IN_1_52 +int nm_setting_ip_config_get_shared_dhcp_lease_time(NMSettingIPConfig *setting); G_END_DECLS diff --git a/src/libnm-core-public/nm-setting-ip4-config.h b/src/libnm-core-public/nm-setting-ip4-config.h index 323fe14d..c40a7603 100644 --- a/src/libnm-core-public/nm-setting-ip4-config.h +++ b/src/libnm-core-public/nm-setting-ip4-config.h @@ -32,6 +32,7 @@ G_BEGIN_DECLS #define NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID "dhcp-client-id" #define NM_SETTING_IP4_CONFIG_DHCP_FQDN "dhcp-fqdn" #define NM_SETTING_IP4_CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER "dhcp-vendor-class-identifier" +#define NM_SETTING_IP4_CONFIG_DHCP_IPV6_ONLY_PREFERRED "dhcp-ipv6-only-preferred" #define NM_SETTING_IP4_CONFIG_LINK_LOCAL "link-local" /** @@ -87,7 +88,9 @@ G_BEGIN_DECLS * "link-local". * @NM_SETTING_IP4_LL_DISABLED: Disable IPv4 link-local protocol. * @NM_SETTING_IP4_LL_ENABLED: Enable the IPv4 link-local protocol regardless what other protocols - * such as DHCP or manually assigned IP addresses might be active. + * such as DHCP or manually assigned IP addresses might be active. + * @NM_SETTING_IP4_LL_FALLBACK: Since 1.52. This sets an IPv4 link-local address if no other IPv4 + * address is set, dynamically removing/re-adding it depending on DHCP leases. * * #NMSettingIP4LinkLocal values indicate whether IPv4 link-local address protocol should be enabled. * @@ -98,8 +101,26 @@ typedef enum { NM_SETTING_IP4_LL_AUTO = 1, NM_SETTING_IP4_LL_DISABLED = 2, NM_SETTING_IP4_LL_ENABLED = 3, + NM_SETTING_IP4_LL_FALLBACK = 4, } NMSettingIP4LinkLocal; +/** + * NMSettingIP4DhcpIpv6OnlyPreferred: + * @NM_SETTING_IP4_DHCP_IPV6_ONLY_PREFERRED_DEFAULT: use the global default value + * @NM_SETTING_IP4_DHCP_IPV6_ONLY_PREFERRED_NO: the option is disabled + * @NM_SETTING_IP4_DHCP_IPV6_ONLY_PREFERRED_YES: the option is enabled + * + * #NMSettingIP4DhcpIpv6OnlyPreferred values specify if the "IPv6-Only Preferred" + * option (RFC 8925) for DHCPv4 is enabled. + * + * Since: 1.52 + */ +typedef enum { + NM_SETTING_IP4_DHCP_IPV6_ONLY_PREFERRED_DEFAULT = -1, + NM_SETTING_IP4_DHCP_IPV6_ONLY_PREFERRED_NO = 0, + NM_SETTING_IP4_DHCP_IPV6_ONLY_PREFERRED_YES = 1, +} NMSettingIP4DhcpIpv6OnlyPreferred; + typedef struct _NMSettingIP4ConfigClass NMSettingIP4ConfigClass; GType nm_setting_ip4_config_get_type(void); @@ -116,6 +137,10 @@ const char *nm_setting_ip4_config_get_dhcp_vendor_class_identifier(NMSettingIP4C NM_AVAILABLE_IN_1_42 NMSettingIP4LinkLocal nm_setting_ip4_config_get_link_local(NMSettingIP4Config *setting); +NM_AVAILABLE_IN_1_52 +NMSettingIP4DhcpIpv6OnlyPreferred +nm_setting_ip4_config_get_dhcp_ipv6_only_preferred(NMSettingIP4Config *setting); + G_END_DECLS #endif /* __NM_SETTING_IP4_CONFIG_H__ */ diff --git a/src/libnm-core-public/nm-setting-ipvlan.h b/src/libnm-core-public/nm-setting-ipvlan.h new file mode 100644 index 00000000..e332585b --- /dev/null +++ b/src/libnm-core-public/nm-setting-ipvlan.h @@ -0,0 +1,69 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2024 Red Hat, Inc. + */ + +#ifndef __NM_SETTING_IPVLAN_H__ +#define __NM_SETTING_IPVLAN_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_IPVLAN (nm_setting_ipvlan_get_type()) +#define NM_SETTING_IPVLAN(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_IPVLAN, NMSettingIpvlan)) +#define NM_IS_SETTING_IPVLAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_IPVLAN)) +#define NM_IS_SETTING_IPVLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_IPVLAN)) +#define NM_SETTING_IPVLAN_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_IPVLAN, NMSettingIpvlanClass)) + +#define NM_SETTING_IPVLAN_SETTING_NAME "ipvlan" + +#define NM_SETTING_IPVLAN_PARENT "parent" +#define NM_SETTING_IPVLAN_MODE "mode" +#define NM_SETTING_IPVLAN_PRIVATE "private" +#define NM_SETTING_IPVLAN_VEPA "vepa" + +typedef struct _NMSettingIpvlanClass NMSettingIpvlanClass; + +/** + * NMSettingIpvlanMode: + * @NM_SETTING_IPVLAN_MODE_UNKNOWN: unknown/unset mode + * @NM_SETTING_IPVLAN_MODE_L2: L2 mode, device receives and responds to ARP. + * @NM_SETTING_IPVLAN_MODE_L3: L3 mode, device process only L3 traffic and above. + * @NM_SETTING_IPVLAN_MODE_L3S: L3S mode, same way as L3 mode but egress and ingress + * lands on netfilter chain. + * + * Since: 1.52 + **/ +typedef enum { + NM_SETTING_IPVLAN_MODE_UNKNOWN = 0, + NM_SETTING_IPVLAN_MODE_L2 = 1, + NM_SETTING_IPVLAN_MODE_L3 = 2, + NM_SETTING_IPVLAN_MODE_L3S = 3, + _NM_SETTING_IPVLAN_MODE_NUM, /*< skip >*/ + NM_SETTING_IPVLAN_MODE_LAST = _NM_SETTING_IPVLAN_MODE_NUM - 1, /*< skip >*/ +} NMSettingIpvlanMode; + +NM_AVAILABLE_IN_1_52 +GType nm_setting_ipvlan_get_type(void); +NM_AVAILABLE_IN_1_52 +NMSetting *nm_setting_ipvlan_new(void); + +NM_AVAILABLE_IN_1_52 +const char *nm_setting_ipvlan_get_parent(NMSettingIpvlan *setting); +NM_AVAILABLE_IN_1_52 +NMSettingIpvlanMode nm_setting_ipvlan_get_mode(NMSettingIpvlan *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_ipvlan_get_private(NMSettingIpvlan *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_ipvlan_get_vepa(NMSettingIpvlan *setting); + +G_END_DECLS + +#endif /* __NM_SETTING_IPVLAN_H__ */ diff --git a/src/libnm-core-public/nm-version-macros.h.in b/src/libnm-core-public/nm-version-macros.h.in index cecc1f25..d204c4df 100644 --- a/src/libnm-core-public/nm-version-macros.h.in +++ b/src/libnm-core-public/nm-version-macros.h.in @@ -76,6 +76,7 @@ #define NM_VERSION_1_46 (NM_ENCODE_VERSION(1, 46, 0)) #define NM_VERSION_1_48 (NM_ENCODE_VERSION(1, 48, 0)) #define NM_VERSION_1_50 (NM_ENCODE_VERSION(1, 50, 0)) +#define NM_VERSION_1_52 (NM_ENCODE_VERSION(1, 52, 0)) /* For releases, NM_API_VERSION is equal to NM_VERSION. * diff --git a/src/libnm-core-public/nm-version.h b/src/libnm-core-public/nm-version.h index e8e18c75..6f7e42f3 100644 --- a/src/libnm-core-public/nm-version.h +++ b/src/libnm-core-public/nm-version.h @@ -411,6 +411,20 @@ #define NM_AVAILABLE_IN_1_50 #endif +#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_52 +#define NM_DEPRECATED_IN_1_52 G_DEPRECATED +#define NM_DEPRECATED_IN_1_52_FOR(f) G_DEPRECATED_FOR(f) +#else +#define NM_DEPRECATED_IN_1_52 +#define NM_DEPRECATED_IN_1_52_FOR(f) +#endif + +#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_52 +#define NM_AVAILABLE_IN_1_52 G_UNAVAILABLE(1, 52) +#else +#define NM_AVAILABLE_IN_1_52 +#endif + /* * Synchronous API for calling D-Bus in libnm is deprecated. See * https://networkmanager.dev/docs/libnm/latest/usage.html#sync-api diff --git a/src/libnm-core-public/nm-vpn-editor-plugin.h b/src/libnm-core-public/nm-vpn-editor-plugin.h index 4e632244..0f9801ef 100644 --- a/src/libnm-core-public/nm-vpn-editor-plugin.h +++ b/src/libnm-core-public/nm-vpn-editor-plugin.h @@ -32,9 +32,9 @@ typedef NMVpnEditorPlugin *(*NMVpnEditorPluginFactory)(GError **error); NMVpnEditorPlugin *nm_vpn_editor_plugin_factory(GError **error); #endif -/*****************************************************************************/ -/* Editor plugin interface */ -/*****************************************************************************/ +/* + * Editor plugin interface + */ #define NM_TYPE_VPN_EDITOR_PLUGIN (nm_vpn_editor_plugin_get_type()) #define NM_VPN_EDITOR_PLUGIN(obj) \ @@ -45,18 +45,20 @@ NMVpnEditorPlugin *nm_vpn_editor_plugin_factory(GError **error); /** * NMVpnEditorPluginCapability: - * @NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE: unknown or no capability - * @NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT: the plugin can import new connections - * @NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT: the plugin can export connections - * @NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6: the plugin supports IPv6 addressing + * @NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE: Unknown or no capability. + * @NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT: The plugin can import new connections. + * @NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT: The plugin can export connections. + * @NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6: The plugin supports IPv6 addressing. + * @NM_VPN_EDITOR_PLUGIN_CAPABILITY_NO_EDITOR: The GUI editor plugin is not available. Since: 1.52. * * Flags that indicate certain capabilities of the plugin to editor programs. **/ typedef enum /*< flags >*/ { - NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE = 0x00, - NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT = 0x01, - NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT = 0x02, - NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6 = 0x04 + NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE = 0x00, + NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT = 0x01, + NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT = 0x02, + NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6 = 0x04, + NM_VPN_EDITOR_PLUGIN_CAPABILITY_NO_EDITOR = 0x08, } NMVpnEditorPluginCapability; /* Short display name of the VPN plugin */ |