From: Vasu Dasari <vdasari@gmail.com>
[mpls-ldp-portable.git] / common / mpls_fib_impl.h
blob79e5fc2ffa60a3952bf56aa8f384170b70e46ca7
2 /*
3 * Copyright (C) James R. Leu 2002
4 * jleu@mindspring.com
6 * This software is covered under the LGPL, for more
7 * info check out http://www.gnu.org/copyleft/lgpl.html
8 */
10 #ifndef _MPLS_FIB_IMPL_H_
11 #define _MPLS_FIB_IMPL_H_
13 #include "mpls_struct.h"
16 * in: handle, cfg, callback,
17 * return: mpls_fib_handle
19 extern mpls_fib_handle mpls_fib_open(const mpls_instance_handle handle,
20 const mpls_cfg_handle cfg);
23 * in: handle
25 extern void mpls_fib_close(mpls_fib_handle handle);
28 * in: handle,num_entry,dest,entry
29 * out: entry
30 * return: int (number of routes returned in entry)
32 extern int mpls_fib_get_route(const mpls_fib_handle handle, const int num_entry,
33 const mpls_fec * dest, mpls_fec * entry);
36 * in: handle,num_entry,dest,entry
37 * out: entry
38 * return: int (number of routes returned in entry)
40 extern int mpls_fib_get_best_route(const mpls_fib_handle handle,
41 const int num_entry, const mpls_fec * dest, mpls_fec * entry);
44 * in: handle
45 * out: fec, nexthop
46 * return: mpls_return_enum
48 extern mpls_return_enum mpls_fib_getfirst_route(const mpls_fib_handle handle,
49 mpls_fec * fec, mpls_nexthop *nexthop);
52 * in: handle, fec, nexthop
53 * out: fec, nexthop
54 * return: mpls_return_enum
56 extern mpls_return_enum mpls_fib_getnext_route(const mpls_fib_handle handle,
57 mpls_fec * fec, mpls_nexthop *nexthop);
60 * in: handle, fec, owner, data
61 * out:
62 * return: mpls_return_enum
64 extern mpls_return_enum mpls_fib_set_data(mpls_fib_handle handle, mpls_fec *fec,
65 mpls_owners_enum owner, void *data);
68 * in: handle, fec, owner
69 * out: data
70 * return: mpls_return_enum
72 extern mpls_return_enum mpls_fib_get_data(mpls_fib_handle handle, mpls_fec *fec,
73 mpls_owners_enum owner, void **data);
75 #endif