mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-18 05:48:11 +02:00
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. |
||
|---|---|---|
| .. | ||
| nm-auth-subject.c | ||
| nm-auth-subject.h | ||
| nm-common-macros.h | ||
| nm-ethtool-utils.c | ||
| nm-ethtool-utils.h | ||
| nm-libnm-core-utils.c | ||
| nm-libnm-core-utils.h | ||
| README.md | ||
nm-libnm-core-intern is a static library that:
- uses parts of "libnm-core", that are public API of "libnm"
- that is statically linked into libnm-core (and thus libnm and NetworkManager).
- that can also be statically linked into other users of libnm.
Basically, it is a static library with utility functions that extends libnm-core (the part that is public API of libnm), but it is used by libnm-core.
That means:
- you can use it everywhere where you either statically link with libnm-core, or dynamically link with libnm.
- you can even use it inside of libnm-core itself. This is the difference between nm-libnm-core-intern and nm-libnm-core-aux.
Also, since nm-libnm-core-intern itself only uses public (stable) API of libnm, you theoretically can copy the sources into your own source tree.