NetworkManager/src/libnm-core-impl
Thomas Haller 3cd02b6ed6
libnm,platform: fix range for "weight" property of next hops for routes
In kernel, the valid range for the weight is 1-256 (on netlink this is
expressed as u8 in rtnh_hops, ranging 0-255).

We need an additional value, to represent

- unset weight, for non-ECMP routes in kernel.

- in libnm API, to express routes that should not be merged as ECMP
  routes (the default).

Extend the type in NMPlatformIP4Route.weight to u16, and fix the code
for the special handling of the numeric range.

Also the libnm API needs to change. Modify the type of the attribute on
D-Bus from "b" to "u", to use a 32 bit integer. We use 32 bit, because
we already have common code to handle 32 bit unsigned integers, despite
only requiring 257 values. It seems better to stick to a few data types
(u32) instead of introducing more, only because the range is limited.

Co-Authored-By: Fernando Fernandez Mancera <ffmancera@riseup.net>

Fixes: 1bbdecf5e1 ('platform: manage ECMP routes')
2023-01-17 14:05:13 +01:00
..
tests libnm,platform: fix range for "weight" property of next hops for routes 2023-01-17 14:05:13 +01:00
gen-metadata-nm-settings-libnm-core.c libnm/trivial: fix style 2022-11-10 14:41:38 +01:00
gen-metadata-nm-settings-libnm-core.xml.in all: add support for ovs-dpdk n-rxq-desc and n-txq-desc 2023-01-17 08:45:04 +01:00
meson.build ovs: add support for "other_config" settings 2023-01-11 21:49:36 +01:00
nm-connection-private.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-connection.c libnm: add ovs-port.trunks property 2022-11-25 14:15:41 +01:00
nm-default-libnm-core.h libnm: move nm-errors.h include away from nm-connection.h 2022-11-13 23:36:37 +01:00
nm-errors.c libnm: don't depend nm-crypto on "nm-error.h" 2022-03-29 11:56:03 +02:00
nm-keyfile-utils.c glib-aux: drop nm_str_buf_init() for NM_STR_BUF_INIT() 2022-05-09 19:18:30 +02:00
nm-keyfile.c ovs: add support for "other_config" settings 2023-01-11 21:49:36 +01:00
nm-meta-setting-base-impl.c ovs: add support for "other_config" settings 2023-01-11 21:49:36 +01:00
nm-property-compare.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-property-compare.h clang-format: use "IndentPPDirectives:None" instead of "BeforeHash" 2021-07-09 08:49:06 +02:00
nm-setting-6lowpan.c libnm: actually export a lot of routines that were supposed to be public 2022-11-08 11:43:00 +01:00
nm-setting-8021x.c setting-8021x: fix "PKCS#11" string in gtk-doc 2022-11-13 23:35:56 +01:00
nm-setting-adsl.c core: move rerequest decision of secrets to NMSetting 2022-10-25 08:40:09 +02:00
nm-setting-bluetooth.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-setting-bond-port.c libnm-core: allow empty slave-type with a NMSettingBondPort 2022-09-21 13:24:14 +02:00
nm-setting-bond.c libnm: fix a handful of misformatted gtk-doc blocks 2022-11-13 23:36:37 +01:00
nm-setting-bridge-port.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-setting-bridge.c libnm: make ref counting of immutable types thread safe 2022-12-20 10:35:02 +01:00
nm-setting-cdma.c core: move rerequest decision of secrets to NMSetting 2022-10-25 08:40:09 +02:00
nm-setting-connection.c libnm: actually export a lot of routines that were supposed to be public 2022-11-08 11:43:00 +01:00
nm-setting-dcb.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-setting-dummy.c libnm: extend NMSettInfoSetting with an offset to the private data 2021-07-12 13:34:40 +02:00
nm-setting-ethtool.c setting-ethtool: fix malformed doc comments 2022-11-13 23:36:37 +01:00
nm-setting-generic.c libnm: extend NMSettInfoSetting with an offset to the private data 2021-07-12 13:34:40 +02:00
nm-setting-gsm.c libnm: mark deprecated D-Bus properties in meta data 2022-10-27 09:11:23 +02:00
nm-setting-hostname.c libnm: actually export a lot of routines that were supposed to be public 2022-11-08 11:43:00 +01:00
nm-setting-infiniband.c libnm: style cleanups for property annotations 2022-09-02 19:03:35 +02:00
nm-setting-ip-config.c libnm,platform: fix range for "weight" property of next hops for routes 2023-01-17 14:05:13 +01:00
nm-setting-ip-tunnel.c libnm: support VTI properties in the ip-tunnel setting 2022-12-21 14:04:44 +01:00
nm-setting-ip4-config.c all: add new "ipv[46].auto-route-ext-gw" setting 2023-01-09 09:35:52 +01:00
nm-setting-ip6-config.c all: add new "ipv[46].auto-route-ext-gw" setting 2023-01-09 09:35:52 +01:00
nm-setting-loopback.c loopback: reject setting "slave-type"/"master" for "loopback" profiles 2022-12-01 13:24:18 +01:00
nm-setting-macsec.c macsec: document the format of CAK and CKN properties 2022-11-16 10:36:39 +01:00
nm-setting-macvlan.c libnm: refactor some NMSetting to use direct properties for string 2022-01-18 16:22:28 +01:00
nm-setting-match.c libnm: rework strv properties of NMSetting as "direct" properties 2022-02-10 22:30:27 +01:00
nm-setting-olpc-mesh.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-setting-ovs-bridge.c libnm: actually export a lot of routines that were supposed to be public 2022-11-08 11:43:00 +01:00
nm-setting-ovs-dpdk.c all: add support for ovs-dpdk n-rxq-desc and n-txq-desc 2023-01-17 08:45:04 +01:00
nm-setting-ovs-external-ids.c ovs: add support for "other_config" settings 2023-01-11 21:49:36 +01:00
nm-setting-ovs-interface.c ovs: add ofport_request option to ovs interface 2022-09-02 08:46:36 +00:00
nm-setting-ovs-other-config.c ovs: add support for "other_config" settings 2023-01-11 21:49:36 +01:00
nm-setting-ovs-patch.c libnm: refactor some NMSetting to use direct properties for string 2022-01-18 16:22:28 +01:00
nm-setting-ovs-port.c libnm: accept "dot1q-tunnel" as vlan mode for ovs-ports 2022-11-25 14:15:41 +01:00
nm-setting-ppp.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-setting-pppoe.c core: move rerequest decision of secrets to NMSetting 2022-10-25 08:40:09 +02:00
nm-setting-private.h all: add new "ipv[46].auto-route-ext-gw" setting 2023-01-09 09:35:52 +01:00
nm-setting-proxy.c libnm/docs: fix documentation for "proxy.pac-script" 2022-03-21 15:21:37 +01:00
nm-setting-serial.c libnm: style cleanups for property annotations 2022-09-02 19:03:35 +02:00
nm-setting-sriov.c libnm: actually export a lot of routines that were supposed to be public 2022-11-08 11:43:00 +01:00
nm-setting-tc-config.c libnm: actually export a lot of routines that were supposed to be public 2022-11-08 11:43:00 +01:00
nm-setting-team-port.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-setting-team.c libnm: document nm_team_link_watcher_{ref,unref}() as thread-safe 2022-12-20 10:35:02 +01:00
nm-setting-tun.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-setting-user.c libnm: fix a large amount of Since tags 2022-11-08 11:40:18 +01:00
nm-setting-veth.c libnm: refactor some NMSetting to use direct properties for string 2022-01-18 16:22:28 +01:00
nm-setting-vlan.c ifcfg-rh: support the vlan.protocol property 2022-12-14 11:33:03 +01:00
nm-setting-vpn.c libnm: fix a handful of misformatted gtk-doc blocks 2022-11-13 23:36:37 +01:00
nm-setting-vrf.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-setting-vxlan.c glib-aux: rename IP address related helpers from "nm-inet-utils.h" 2022-08-25 19:05:51 +02:00
nm-setting-wifi-p2p.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-setting-wimax.c libnm: mark deprecated D-Bus properties in meta data 2022-10-27 09:11:23 +02:00
nm-setting-wired.c all: fix "-Wcast-align=strict" warnings for GArray casts 2022-12-09 09:15:55 +01:00
nm-setting-wireguard.c libnm: make ref counting of immutable types thread safe 2022-12-20 10:35:02 +01:00
nm-setting-wireless-security.c libnm: fix a large amount of Since tags 2022-11-08 11:40:18 +01:00
nm-setting-wireless.c all: fix "-Wcast-align=strict" warnings for GArray casts 2022-12-09 09:15:55 +01:00
nm-setting-wpan.c libnm: actually export a lot of routines that were supposed to be public 2022-11-08 11:43:00 +01:00
nm-setting.c libnm: make NMRange ref/unref thread-safe 2022-12-20 10:35:02 +01:00
nm-simple-connection.c libnm: use NMRefString for nm_connection_get_path() 2022-10-06 13:43:33 +02:00
nm-team-utils.c clang-format: reformat code with clang-format 15.0.4-1.fc37 2022-11-23 09:17:21 +01:00
nm-team-utils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-utils-private.h libnm: move verify() for OVS connection type to separate function 2023-01-11 12:45:35 +01:00
nm-utils.c libnm: workaround compiler warning in nm_sock_addr_endpoint_new() 2022-11-30 08:49:07 +01:00
nm-vpn-editor-plugin.c libnm: workaround crash in nm_vpn_editor_plugin_import() for plugin requiring GError 2022-11-16 13:05:55 +01:00
nm-vpn-plugin-info.c libnm: actually export a lot of routines that were supposed to be public 2022-11-08 11:43:00 +01:00
README.md build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00

libnm-core-impl

NetworkManager provides a client library libnm. NetworkManager core does not (dynamically) link against all of libnm. Instead, it statically links against a part of it. That part is the static helper library libnm-core-impl.

libnm-core-impl implements (and provides) the API from libnm-core-public, which is part of the public API of libnm. In this form, libnm-core-impl is part of the implementation of libnm. It also implements (and provides) an internal API libnm-core-intern which can only be used by those who link statically against libnm-core-impl.

Only NetworkManager core and libnm are allowed to statically link with libnm-core-impl. Consequently, only those are allowed to include libnm-core-intern.

This directory should not be added to the include search path of other components as they are only allowed to include libnm-core-public and libnm-core-intern.