libnl 3.7.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
15extern "C" {
16#endif
17
18struct flnl_result;
19
20extern struct flnl_result * flnl_result_alloc(void);
21extern void flnl_result_put(struct flnl_result *);
22
23extern struct nl_cache * flnl_result_alloc_cache(void);
24
25extern int flnl_lookup_build_request(struct flnl_request *,
26 int,
27 struct nl_msg **);
28extern int flnl_lookup(struct nl_sock *,
29 struct flnl_request *,
30 struct nl_cache *);
31
32extern int flnl_result_get_table_id(struct flnl_result *res);
33extern int flnl_result_get_prefixlen(struct flnl_result *res);
34extern int flnl_result_get_nexthop_sel(struct flnl_result *res);
35extern int flnl_result_get_type(struct flnl_result *res);
36extern int flnl_result_get_scope(struct flnl_result *res);
37extern int flnl_result_get_error(struct flnl_result *res);
38
39#ifdef __cplusplus
40}
41#endif
42
43#endif
struct nl_cache * flnl_result_alloc_cache(void)
Allocate lookup result cache.
Definition: lookup.c:177
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
int flnl_lookup(struct nl_sock *, struct flnl_request *, struct nl_cache *)
Perform FIB Lookup.
Definition: lookup.c:256