libnl 3.5.0

lookup.h
1 /*
2 * netlink/fib_lookup/fib_lookup.h FIB Lookup
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation version 2.1
7 * of the License.
8 *
9 * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch>
10 */
11
12 #ifndef NETLINK_FIB_LOOKUP_H_
13 #define NETLINK_FIB_LOOKUP_H_
14
15 #include <netlink/netlink.h>
16 #include <netlink/cache.h>
17 #include <netlink/addr.h>
18 #include <netlink/fib_lookup/request.h>
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 struct flnl_result;
25
26 extern struct flnl_result * flnl_result_alloc(void);
27 extern void flnl_result_put(struct flnl_result *);
28
29 extern struct nl_cache * flnl_result_alloc_cache(void);
30
31 extern int flnl_lookup_build_request(struct flnl_request *,
32 int,
33 struct nl_msg **);
34 extern int flnl_lookup(struct nl_sock *,
35 struct flnl_request *,
36 struct nl_cache *);
37
38 extern int flnl_result_get_table_id(struct flnl_result *res);
39 extern int flnl_result_get_prefixlen(struct flnl_result *res);
40 extern int flnl_result_get_nexthop_sel(struct flnl_result *res);
41 extern int flnl_result_get_type(struct flnl_result *res);
42 extern int flnl_result_get_scope(struct flnl_result *res);
43 extern int flnl_result_get_error(struct flnl_result *res);
44
45 #ifdef __cplusplus
46 }
47 #endif
48
49 #endif
flnl_lookup
int flnl_lookup(struct nl_sock *, struct flnl_request *, struct nl_cache *)
Perform FIB Lookup.
Definition: lookup.c:261
flnl_lookup_build_request
int flnl_lookup_build_request(struct flnl_request *, int, struct nl_msg **)
Builds a netlink request message to do a lookup.
Definition: lookup.c:210
flnl_result_alloc_cache
struct nl_cache * flnl_result_alloc_cache(void)
Allocate lookup result cache.
Definition: lookup.c:182