libnl  3.6.0
lookup.h
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3  * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch>
4  */
5 
6 #ifndef NETLINK_FIB_LOOKUP_H_
7 #define NETLINK_FIB_LOOKUP_H_
8 
9 #include <netlink/netlink.h>
10 #include <netlink/cache.h>
11 #include <netlink/addr.h>
12 #include <netlink/fib_lookup/request.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 struct flnl_result;
19 
20 extern struct flnl_result * flnl_result_alloc(void);
21 extern void flnl_result_put(struct flnl_result *);
22 
23 extern struct nl_cache * flnl_result_alloc_cache(void);
24 
25 extern int flnl_lookup_build_request(struct flnl_request *,
26  int,
27  struct nl_msg **);
28 extern int flnl_lookup(struct nl_sock *,
29  struct flnl_request *,
30  struct nl_cache *);
31 
32 extern int flnl_result_get_table_id(struct flnl_result *res);
33 extern int flnl_result_get_prefixlen(struct flnl_result *res);
34 extern int flnl_result_get_nexthop_sel(struct flnl_result *res);
35 extern int flnl_result_get_type(struct flnl_result *res);
36 extern int flnl_result_get_scope(struct flnl_result *res);
37 extern int flnl_result_get_error(struct flnl_result *res);
38 
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 #endif
int flnl_lookup_build_request(struct flnl_request *, int, struct nl_msg **)
Builds a netlink request message to do a lookup.
Definition: lookup.c:205
struct nl_cache * flnl_result_alloc_cache(void)
Allocate lookup result cache.
Definition: lookup.c:177
int flnl_lookup(struct nl_sock *, struct flnl_request *, struct nl_cache *)
Perform FIB Lookup.
Definition: lookup.c:256