mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 11:50:14 +01:00
Create and use new nl_socket_new(). nl_socket_alloc() really does nothing but allocating the struct and initializing the fd to -1. In all cases, we want to call nl_connect() right after. Combine the two. Then we also cannot have a "struct nl_sock" without a valid fd. This means several error checks can be dropped. Note that former nl_connect() did several things at once. Maybe, for more flexibility one would need to tweak what should be done there. For now that is not necessary. In any case, if we need more flexibility, then we would control what nl_connect() (now nl_socket_new()) does, and not the split between nl_socket_alloc() and nl_connect(). |
||
|---|---|---|
| .. | ||
| tests | ||
| wifi | ||
| wpan | ||
| meson.build | ||
| nm-linux-platform.c | ||
| nm-linux-platform.h | ||
| nm-netlink.c | ||
| nm-netlink.h | ||
| nm-platform-private.h | ||
| nm-platform-utils.c | ||
| nm-platform-utils.h | ||
| nm-platform.c | ||
| nm-platform.h | ||
| nmp-base.h | ||
| nmp-netns.c | ||
| nmp-netns.h | ||
| nmp-object.c | ||
| nmp-object.h | ||
| nmp-route-manager.c | ||
| nmp-route-manager.h | ||
| README.md | ||
libnm-platform
A static helper library that provides NMPlatform and other utils.
This is NetworkManager's internal netlink library, but also contains
helpers for sysfs, ethtool and other kernel APIs.
NMPlaform is also a cache of objects of the netlink API: NMPCache
and NMPObject. These objects are used throughout NetworkManager
also for generally tracking information about these types. For example,
NMPlatformIP4Address (the public part of a certain type of NMPObject)
is not only used to track platform addresses from netlink in the cache,
but to track information about IPv4 addresses in general.
This depends on the following helper libraries