diff options
author | Thomas Haller <thaller@redhat.com> | 2023-08-01 08:56:47 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-08-02 20:20:12 (GMT) |
commit | 1010776d62a0e0ae261fff61c6c00f3f0c1ff2a0 (patch) | |
tree | 6472fb70628d554104964afbfda928ceecbde800 /lib/fib_lookup | |
parent | d1d57846ccb8d9664206a0a3f735db26d4bc4c8d (diff) | |
download | libnl-1010776d62a0e0ae261fff61c6c00f3f0c1ff2a0.zip libnl-1010776d62a0e0ae261fff61c6c00f3f0c1ff2a0.tar.gz libnl-1010776d62a0e0ae261fff61c6c00f3f0c1ff2a0.tar.bz2 |
include: split and drop "netlink-private/types.h"
Move all the declarations from "netlink-private/types.h" to places
closer to where they are used.
Diffstat (limited to 'lib/fib_lookup')
-rw-r--r-- | lib/fib_lookup/lookup.c | 20 | ||||
-rw-r--r-- | lib/fib_lookup/request.c | 17 |
2 files changed, 34 insertions, 3 deletions
diff --git a/lib/fib_lookup/lookup.c b/lib/fib_lookup/lookup.c index 3585a4d..35913bb 100644 --- a/lib/fib_lookup/lookup.c +++ b/lib/fib_lookup/lookup.c @@ -10,8 +10,6 @@ * @{ */ -#include <netlink-private/netlink.h> -#include "base/nl-base-utils.h" #include <netlink/netlink.h> #include <netlink/attr.h> #include <netlink/utils.h> @@ -21,7 +19,25 @@ #include <netlink/fib_lookup/request.h> #include <netlink/fib_lookup/lookup.h> +#include <netlink-private/netlink.h> + +#include "base/nl-base-utils.h" +#include "nl-priv-dynamic-core/object-api.h" + /** @cond SKIP */ +struct flnl_result +{ + NLHDR_COMMON + + struct flnl_request * fr_req; + uint8_t fr_table_id; + uint8_t fr_prefixlen; + uint8_t fr_nh_sel; + uint8_t fr_type; + uint8_t fr_scope; + uint32_t fr_error; +}; + static struct nl_cache_ops fib_lookup_ops; static struct nl_object_ops result_obj_ops; diff --git a/lib/fib_lookup/request.c b/lib/fib_lookup/request.c index aca7b1f..6b35287 100644 --- a/lib/fib_lookup/request.c +++ b/lib/fib_lookup/request.c @@ -10,16 +10,31 @@ * @{ */ -#include <netlink-private/netlink.h> #include <netlink/netlink.h> #include <netlink/attr.h> #include <netlink/utils.h> #include <netlink/object.h> #include <netlink/fib_lookup/request.h> +#include <netlink-private/netlink.h> + +#include "nl-priv-dynamic-core/nl-core.h" +#include "nl-priv-dynamic-core/object-api.h" + static struct nl_object_ops request_obj_ops; /** @cond SKIP */ +struct flnl_request +{ + NLHDR_COMMON + + struct nl_addr * lr_addr; + uint32_t lr_fwmark; + uint8_t lr_tos; + uint8_t lr_scope; + uint8_t lr_table; +}; + #define REQUEST_ATTR_ADDR 0x01 #define REQUEST_ATTR_FWMARK 0x02 #define REQUEST_ATTR_TOS 0x04 |