Commit graph

732 commits

Author SHA1 Message Date
Thomas Haller fa3ac35031
shared: remove unused "shared/nm-default.h" 2021-02-09 12:38:18 +01:00
Thomas Haller 66eccf7ad7
all: add "nm-default-systemd{,-shared}.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
Thomas Haller dc2afc9b77
all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
Thomas Haller 78629830c8
all: add "libnm-core/nm-default-libnm-core.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
Thomas Haller a38afcb1d9
all: add "libnm/nm-default-libnm.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
Thomas Haller 606612ea59
all: add "libnm/nm-default-client.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
Thomas Haller 8f4f91b667
all: add "nm-glib-aux/nm-default-glib-i18n-prog.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
Thomas Haller bbb86cc11a
all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
Thomas Haller d69f12f9e7
all: add "nm-glib-aux/nm-default-glib.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
Thomas Haller dbdac49b81
all: add "nm-std-aux/nm-default-std.h" as replacement for "nm-default.h"
autotools projects commonly should include "config.h" as first header.
Also, commonly we need more headers, like glib.h or our nm_auto macros.
Hence, almost all our sources should as first include "nm-default.h".

However, as we build different parts, "nm-default.h" gets controlled
by the NETWORKMANAGER_COMPILATION define which autotools/meson needs
to specify in the build options.

That is confusing.

One advantage of that was, that theoretically the same sources can
be built twice, with different behavior. However, we should avoid doing
that altogether and build static libraries (once) that we link multiple
times.

Another advantage was that if NETWORKMANAGER_COMPILATION is for example
set to build a DAEMON source, there is a check that we don't include
private headers from libnm-core. However, that should be better solved
by not having public, internal and private headers in the same
directory.

Instead, introduce different "nm-default-*.h" headers that don't require
special defines and behave in a consistent way. This way, we require
fewer CFLAGS and it's immediately clear by looking at the source alone
which headers are included. Also, you will be easier see when a wrong
nm-default-*.h header gets included.

Introduce the first replacement. The others will follow.
2021-02-09 12:38:17 +01:00
Thomas Haller 021e87c084
shared: add "shared/nm-std-aux/nm-networkmanager-compilation.h" header 2021-02-09 12:38:17 +01:00
Thomas Haller 37075878a7
libnm: compile keyfile code like libnm-core
By now, keyfile code got relicensed as LGPL-2.1+ and is just a regular part
of libnm-core (in particular, because it uses private API of libnm-core).

It should no longer be in a separate directory, but for now, at lead compile
it the same as libnm-core.
2021-02-09 12:38:17 +01:00
Thomas Haller ed9ff9c3df
build: remove unused "nm-core-enum-types.[hc].template" files 2021-02-09 12:38:16 +01:00
Thomas Haller 0bcd453e8c
initrd/tests: drop special define for test directory
We got rid of all these redundant defines. All we need, is the base
source directory, which we already define in config.h as
NM_BUILD_SRCDIR. Use that.
2021-02-09 12:38:16 +01:00
Thomas Haller a4ca3acb6b
build: drop duplicate line from Makefile.am 2021-02-09 12:38:16 +01:00
Thomas Haller cbb59e3308
autotools: add check-progs target
If you configure with "--enable-tests=no", then the tests
are not build during `make all`, but only during `make check`.
That is convenient for development, so if you don't work on tests,
they usually don't get build and the (partial) compilation is faster.

However, there is no target to build the tests without running them.

Add `make check-progs` for that.
2021-02-04 10:05:28 +01:00
Thomas Haller ac1a9e03e4
all: move "src/" directory to "src/core/"
Currently "src/" mostly contains the source code of the daemon.
I say mostly, because that is not true, there are also the device,
settings, wwan, ppp plugins, the initrd generator, the pppd and dhcp
helper, and probably more.

Also we have source code under libnm-core/, libnm/, clients/, and
shared/ directories. That is all confusing.

We should have one "src" directory, that contains subdirectories. Those
subdirectories should contain individual parts (libraries or
applications), that possibly have dependencies on other subdirectories.
There should be a flat hierarchy of directories under src/, which
contains individual modules.

As the name "src/" is already taken, that prevents any sensible
restructuring of the code.

As a first step, move "src/" to "src/core/". This gives space to
reorganize the code better by moving individual components into "src/".

For inspiration, look at systemd's "src/" directory.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/743
2021-02-04 09:45:55 +01:00
Thomas Haller 5d85d7c849
shared: split redefining g_return* warning out of "nm-default.h"
It's confusing enough. Let's keep "nm-default.h" simpler.
Especially due to the nesting of #if, which clang-format wants
to indent.
2021-01-27 21:30:20 +01:00
Thomas Haller beb29ffb3c
build: rename static "liblibnm" to "libnm-static"
This is basically all of libnm as a static-library. The name
liblibnm isn't great. Arguably, we do have quite a lot of
libnmxyz, so finding a good name is hard. But libnm-static seems
a better name. Rename.
2021-01-27 21:25:46 +01:00
Beniamino Galvani c243e003d6 build: add missing dependency of nm-base for config-extra.h in Makefile.am
Fix the following build error:

 In file included from shared/nm-base/nm-ethtool-base.c:6:
 ./shared/nm-default.h:87:10: fatal error: config-extra.h: No such file or directory
    87 | #include "config-extra.h"
       |          ^~~~~~~~~~~~~~~~

Fixes: e5d2a05ad5 ('libnm: add "shared/nm-base/nm-base.h"')
2021-01-18 09:57:18 +01:00
Thomas Haller a288de4b3d
shared: add "shared/README.md" 2021-01-15 12:17:15 +01:00
Thomas Haller 9901aeef2c
platform: move "nm-platform-utils.[hc]" to "shared/nm-platform" library
By now it has no further dependencies on libnm-core or NetworkManager core.
Make it part of "shared/nm-platform" library.
2021-01-15 11:32:53 +01:00
Thomas Haller 874bd8994e
libnm,shared: move nm-ethtool helper to "libnm-base"
We want to use this by "shared/nm-platform", which should have
no dependency on "libnm-core".

Move "libnm-core/nm-ethtool-utils.h" to "libnm/nm-ethtool-utils.h" so
that it is only used by libnm. This file contains the defines for
the option names.

Also, symlink "libnm/nm-ethtool-utils.h" as "shared/nm-base/nm-ethtool-utils-base.h".
We want to use the same defines also internally. Since they are both
public API (must be in libnm) and should be in "shared/nm-base", this
is the way.
2021-01-15 11:32:41 +01:00
Thomas Haller 19242f56d7
libnm: split ethtool option names to a new header "libnm-core/nm-ethtool-utils.h"
We want to use these defines for option names also in "shared/nm-base"
(and in turn in "shared/nm-platform), which cannot include "libnm-core".

However, they are also public API of libnm.

To get this done, in a first step, move these defines to a new header
"libnm-core/nm-ethtool-utils.h".

Since now the name "nm-ethtool-utils.h" is taken, also rename
nm-libnm-core-intern files.
2021-01-15 11:32:39 +01:00
Thomas Haller e5d2a05ad5
libnm: add "shared/nm-base/nm-base.h"
Our dependencies are complicated.

Currently "src/platform" uses parts of libnm-core and is relatively
strongly entangled with core. It would be nice to have that part
clearly independent from "src" and from "libnm-core".

Also, "src/platform/nm-platform-utils.h" uses NMEthtoolID enum, which
previously was defined in "libnm-core/nm-libnm-core-intern/nm-ethtool-utils.h".

Move that to a new place "shared/nm-base/nm-base.h".

Note that we have "libnm-core/nm-libnm-core-intern", which is
libnm/core related code which uses and is used by libnm-core.
There is a need for a library which is used by libnm-core, but
does not depend on libnm-core itself. Here comes "shared/nm-base".

Yes, many libraries. But the goal is to entangle the dependencies
and have a clear hierarchy of includes. And to have "shared/nm-platform"
independent of libnm-core.
2021-01-15 11:32:32 +01:00
Thomas Haller 31dca65e04
shared,platform: move "nmp-netns.[hc]" to shared/nm-platform 2021-01-15 11:32:31 +01:00
Thomas Haller 24c634bf57
core/logging: move "nm-logging.c" to shared/nm-log-core/libnm-log-core library
We want to move platform code to "shared/nm-platform". However, platform
code uses the logging infrastructure from the daemon, there is thus
an odd circular dependency.

Solve that by moving the "src/nm-logging.[hc]" to a new helper library
in "shared/nm-log-core".
2021-01-15 11:32:31 +01:00
Thomas Haller 186f2da2fc
shared,platform: add "shared/nm-platform" library
NetworkManager core is huge. We should try to split out
parts that are independent.

Platform code is already mostly independent. But due to having it
under "src/", there is no strict separation/layering which determines
the parts that can work independently. So, while the code is mostly
independent (in practice), that is not obvious from looking at the
source tree. It thus still contributes to cognitive load.

Add a shared library "shared/nm-platform", which should have no
dependencies on libnm-core or NetworkManager core.

In a first step, move the netlink code there. More should follow.
2021-01-15 11:32:30 +01:00
Thomas Haller fd2e626b40
build: add missing dependency for config-extra.h in Makefile.am 2021-01-15 11:32:29 +01:00
Thomas Haller 27f57be076
build: add missing linking with systemd-journald library
These programs use sd_journal_sendv(), they thus need to link against
systemd library.
2021-01-15 11:32:28 +01:00
Thomas Haller d34d823995
systemd: merge branch systemd into master
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/714
2021-01-05 09:22:56 +01:00
Antonio Cardace ff6cb8f528
wifi: merge branch 'ac/wpa3eap_suiteb192'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/709
2020-12-22 18:30:34 +01:00
Antonio Cardace e874ccc917
wifi: add WPA-EAP-SUITE-B-192 support
Add a new key management option to support WPA3 Enteprise wifi
connection.

Only supported with wpa_supplicant for the time being.

Signed-off-by: Antonio Cardace <acardace@redhat.com>
2020-12-22 18:28:56 +01:00
Thomas Haller 90704dafae
libnm: include "nm-core-enum-types.h" in libnm headers with quotes
In C, includes with <> are for system headers, while "" prefers the
current working directory (implementation defined).

For libnm headers that include other libnm headers, we tend to use
"" instead of <>. That makes sense to me. Be consistent about that.
2020-12-22 16:33:27 +01:00
Thomas Haller a4f1fa0893
man: add man 8 nm-cloud-setup
https://bugzilla.redhat.com/show_bug.cgi?id=1867997
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/ ## 600
2020-12-11 17:36:38 +01:00
Fernando Fernandez Mancera cd0cf9229d
veth: add support to configure veth interfaces
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>
2020-11-27 10:12:36 +01:00
Thomas Haller bef8166893
build: add make-check step to check and generate ".gitlab-ci.yml" 2020-11-17 13:19:14 +01:00
Beniamino Galvani abd002642f all: add hostname setting
Add a new setting that contains properties related to how NM should
get the hostname from the connection.
2020-11-16 16:43:39 +01:00
Thomas Haller ebbc2c9c0d
build: fix handling NMTST_SKIP_PYTHON_BLACK for skipping make check-python-black test
Fixes: c537852231 ('build: optionally skip python black check by setting NMTST_SKIP_PYTHON_BLACK=1')
2020-11-10 20:21:03 +01:00
Thomas Haller 6100b52e5c
libnm: add NMSettingOvsExternalIDs 2020-11-09 17:53:15 +01:00
Thomas Haller 62411390e2
build: rename "tools/check-settings-docs.sh" to "check-compare-generated.sh"
It's a better name, because the script merely compiles files and
is not specific to "settings-docs.h".
2020-11-03 15:41:39 +01:00
Thomas Haller ab8fdb73e6
build: commit pre-generated "generate-docs-nm-settings-nmcli.xml" to git
We can generate "generate-docs-nm-settings-nmcli.xml" by running "clients/cli/generate-docs-nm-settings-nmcli".
However, during cross compilation, that binary gets build in the target architecture,
it can thus not run to generate the XML.
2020-11-03 15:41:39 +01:00
Thomas Haller a208da4139
build: only generate "settings-docs.h" with "--enable-gtk-doc"
Note that "--enable-gtk-doc" requires "--enable-introspection".

For generating "settings-docs.h" we (only) need introspection/pygobject.
We also have a pre-generated .in file that we can use if introspection
is not available. Since we have a pre-generated variant, it would be fine
to always use that one. However, we want to use generate the file if we
have the necessary dependencies, because thereby we can check whether
the pre-generated file is identical to what would be generated.

We have a similar problem with "generate-docs-nm-settings-nmcli.xml".
However there we don't need introspection, but merely being able to
execute a binary that we build. That does not work during cross
compilation, so we will honor "--enable-gtk-doc" flag to decide when
to generate the file.

For consistency, also adjust the condition for "settings-docs.h" to only
generate the file if we have "--enable-gtk-doc" (but not it we build
with "--enable-introspection" alone).
2020-11-03 15:41:38 +01:00
Thomas Haller 755d97d38c
libnm/tests: include "nm-default.h" for "libnm-core/tests/nm-core-tests-enum-types.c"
With glib2-2.67.0-1.fc34.x86_64.rpm, clang-11.0.0-2.fc34.x86_64.rpm, the
generated code emits a compiler warning:

    libnm-core/tests/nm-core-tests-enum-types.c:17:7: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      if (g_once_init_enter (&g_define_type_id__volatile))
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter'
        (!g_atomic_pointer_get (location) &&                             \
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get'
        __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
                                         ^~~~~~~~~~~~~~~~~
    libnm-core/tests/nm-core-tests-enum-types.c:40:7: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      if (g_once_init_enter (&g_define_type_id__volatile))
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter'
        (!g_atomic_pointer_get (location) &&                             \
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get'
        __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
                                         ^~~~~~~~~~~~~~~~~
    libnm-core/tests/nm-core-tests-enum-types.c:63:7: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      if (g_once_init_enter (&g_define_type_id__volatile))
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter'
        (!g_atomic_pointer_get (location) &&                             \
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get'
        __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
                                         ^~~~~~~~~~~~~~~~~

We could pass "-Wincompatible-pointer-types-discards-qualifiers" as CFLAGS
when building this file. However, we have a workaround in our "nm-glib-aux/nm-glib.h",
so we can instead include "nm-default.h". At first glance, that might look like
the less preferable solution. However, this file is only there for unit tests,
and we also include "nm-default.h" for other sources that are generated with
"glib-mkenums". So, doing it also for our tests becomes the preferable solution.
2020-11-03 15:39:01 +01:00
Thomas Haller 03d9ec27fa
introspection: avoid compiler warning in generated introspection files
Disable "-Wincompatible-pointer-types-discards-qualifiers" warning, as
this breaks build of the gdbus-codegen files.

With glib2-2.67.0-1.fc34.x86_64.rpm, clang-11.0.0-2.fc34.x86_64.rpm, we
get a failure to build generated code:

    introspection/org.freedesktop.NetworkManager.AccessPoint.c:438:1: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    G_DEFINE_INTERFACE (NMDBusAccessPoint, nmdbus_access_point, G_TYPE_OBJECT)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/gobject/gtype.h:1784:47: note: expanded from macro 'G_DEFINE_INTERFACE'
    #define G_DEFINE_INTERFACE(TN, t_n, T_P)                    G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;)
                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/gobject/gtype.h:1803:61: note: expanded from macro 'G_DEFINE_INTERFACE_WITH_CODE'
    #define G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, _C_)     _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TN, t_n, T_P) {_C_;} _G_DEFINE_INTERFACE_EXTENDED_END()
                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/gobject/gtype.h:2042:7: note: expanded from macro '_G_DEFINE_INTERFACE_EXTENDED_BEGIN'
      if (g_once_init_enter (&g_define_type_id__volatile))  \
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter'
        (!g_atomic_pointer_get (location) &&                             \
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get'
        __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
                                         ^~~~~~~~~~~~~~~~~
    introspection/org.freedesktop.NetworkManager.AccessPoint.c:944:1: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    G_DEFINE_TYPE_WITH_CODE (NMDBusAccessPointProxy, nmdbus_access_point_proxy, G_TYPE_DBUS_PROXY,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/gobject/gtype.h:1615:56: note: expanded from macro 'G_DEFINE_TYPE_WITH_CODE'
    #define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_)          _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/gobject/gtype.h:2032:3: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN'
      _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/gobject/gtype.h:2000:7: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER'
      if (g_once_init_enter (&g_define_type_id__volatile))  \
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter'
        (!g_atomic_pointer_get (location) &&                             \
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get'
        __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
                                         ^~~~~~~~~~~~~~~~~
    introspection/org.freedesktop.NetworkManager.AccessPoint.c:1729:1: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    G_DEFINE_TYPE_WITH_CODE (NMDBusAccessPointSkeleton, nmdbus_access_point_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/gobject/gtype.h:1615:56: note: expanded from macro 'G_DEFINE_TYPE_WITH_CODE'
    #define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_)          _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/gobject/gtype.h:2032:3: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN'
      _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/gobject/gtype.h:2000:7: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER'
      if (g_once_init_enter (&g_define_type_id__volatile))  \
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter'
        (!g_atomic_pointer_get (location) &&                             \
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get'
        __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
                                         ^~~~~~~~~~~~~~~~~
2020-11-03 15:39:00 +01:00
Thomas Haller e0a3a5e2f8
build: don't depend dispatcher code on introspection sources
The dispatcher code does not use the generated introspection sources
(anymore). Don't add a dependency.
2020-11-03 15:38:25 +01:00
Thomas Haller 157d7bd5b9
keyfile: expose keyfile handling in libnm as public API 2020-10-28 14:30:49 +01:00
Thomas Haller 49fd96bf01
libnm: add "nm-keyfile.h" header
Keyfile API will become part of public libnm API. Add "nm-keyfile.h"
header for that.
2020-10-28 14:30:48 +01:00
Thomas Haller 17269b0520
l3cfg: add support for IPv4 link local addresses (ipv4ll) to NML3Cfg
NML3Cfg already handles IPv4 ACD. IPv4LL is just a small additional
layer on top of that, so it makes sense that it also is handled by
NML3Cfg.

Also, the overall goal is that multiple NMDevice and NMVpnConnection
instances can cooperate independently. So if multiple "users" enable
IPv4LL on an interface, then we should only run it once. This is
achieved by NML3IPv4LL's API where users register what they want,
and NML3IPv4LL figures out what that means as a whole.

Also, we thus will no longer need to use sd_ipv4ll/n-ipv4ll, because
we implement it ourself.
2020-10-23 17:11:57 +02:00
Thomas Haller 7141537097
l3cfg/tests: add unit test for NML3Cfg 2020-09-24 09:44:04 +02:00