diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2023-11-05 18:16:54 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2023-11-05 18:19:09 +0100 |
| commit | 19cbc3157983ec0a1a15ec1be90a4a1a3de9969b (patch) | |
| tree | 31268972dbfe40422b8991c4998aaa848597b495 /lib/prefix.h | |
| parent | 4bdba57861d1325b42b5b81c118bf76b51f172e5 (diff) | |
lib: rename `prefixtype` to `uniontype`
About to use this for sockunion, which is not a prefix. `uniontype`
makes more sense, the macros are for defining transparent unions after
all.
(clang-format off thrown in as it otherwise wrecks formatting.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/prefix.h')
| -rw-r--r-- | lib/prefix.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/prefix.h b/lib/prefix.h index fc6e32dd54..14f2695933 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -286,23 +286,25 @@ struct prefix_sg { struct in_addr grp; }; +/* clang-format off */ union prefixptr { - prefixtype(prefixptr, struct prefix, p) - prefixtype(prefixptr, struct prefix_ipv4, p4) - prefixtype(prefixptr, struct prefix_ipv6, p6) - prefixtype(prefixptr, struct prefix_evpn, evp) - prefixtype(prefixptr, struct prefix_fs, fs) - prefixtype(prefixptr, struct prefix_rd, rd) + uniontype(prefixptr, struct prefix, p) + uniontype(prefixptr, struct prefix_ipv4, p4) + uniontype(prefixptr, struct prefix_ipv6, p6) + uniontype(prefixptr, struct prefix_evpn, evp) + uniontype(prefixptr, struct prefix_fs, fs) + uniontype(prefixptr, struct prefix_rd, rd) } TRANSPARENT_UNION; union prefixconstptr { - prefixtype(prefixconstptr, const struct prefix, p) - prefixtype(prefixconstptr, const struct prefix_ipv4, p4) - prefixtype(prefixconstptr, const struct prefix_ipv6, p6) - prefixtype(prefixconstptr, const struct prefix_evpn, evp) - prefixtype(prefixconstptr, const struct prefix_fs, fs) - prefixtype(prefixconstptr, const struct prefix_rd, rd) + uniontype(prefixconstptr, const struct prefix, p) + uniontype(prefixconstptr, const struct prefix_ipv4, p4) + uniontype(prefixconstptr, const struct prefix_ipv6, p6) + uniontype(prefixconstptr, const struct prefix_evpn, evp) + uniontype(prefixconstptr, const struct prefix_fs, fs) + uniontype(prefixconstptr, const struct prefix_rd, rd) } TRANSPARENT_UNION; +/* clang-format on */ #ifndef INET_ADDRSTRLEN #define INET_ADDRSTRLEN 16 |
