summaryrefslogtreecommitdiffstats
path: root/include/base
Commit message (Collapse)AuthorAgeFilesLines
* base: add _nl_swap() helper macroThomas Haller2024-08-221-0/+13
|
* base: add _nl_ptrarray_len() helperThomas Haller2024-08-221-0/+22
|
* format: reformat "include/base/nl-base-utils.h"Thomas Haller2024-05-291-4/+1
| | | | This is necessary to comply with current clang-format (18.1.6-3.fc40).
* all: use defines for attributesThomas Haller2024-04-221-2/+2
| | | | We have those defines. Use them throughout.
* base: add _NL_AUTO_DEFINE_FCN_INDIRECT0() macroThomas Haller2023-12-011-0/+8
| | | | | | | This is useful for a very special case. For a cleanup macro that calls rtnl_act_put_all(). In that case, we have a auto variable `struct rtnl_act *head`, but the cleanup function expects as argument `&head`.
* base: don't use static array indices for buffer argument of _nl_inet_ntop()Thomas Haller2023-12-011-2/+1
| | | | | | | | | | | | Seems the static array indices can confuse coverity. I think coverity is wrong here, regardless, change it. libnl-3.8.0/include/base/nl-base-utils.h:683: overrun-buffer-arg: Overrunning buffer pointed to by "buf" of 16 bytes by passing it to a function which accesses it at byte offset 45 using argument "(addr_family == 2) ? 16 : 46" (which evaluates to 46). # 681| * and a suitably large buffer, it cannot. Assert for that. */ # 682| # 683|-> r = (char *)inet_ntop(addr_family, addr, buf, # 684| (addr_family == AF_INET) ? INET_ADDRSTRLEN : # 685| INET6_ADDRSTRLEN);
* nl-base-utils: add _nl_addr_family_to_size() helperThomas Haller2023-11-291-0/+11
|
* clang-format: reformat files with new formatThomas Haller2023-08-171-212/+212
| | | | $ ./tools/clang-format.sh
* include: drop "netlink-private/netlink.h" and move declarationsThomas Haller2023-08-021-1/+109
|
* base: move "netlink-private/utils.h" to "base/nl-base-utils.h"Thomas Haller2023-07-312-0/+729
"base/nl-base-utils.h" (formerly "netlink-private/utils.h") contains no libnl3 specific references, just a bunch of C helpers. It's also a header-only "library", so it can be freely used by all our C-code. Move it to a separate directory, to make that clear.