3 * Copyright (C) James R. Leu 2002
6 * This software is covered under the LGPL, for more
7 * info check out http://www.gnu.org/copyleft/lgpl.html
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
);
25 extern void mpls_fib_close(mpls_fib_handle handle
);
28 * in: handle,num_entry,dest,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
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
);
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
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
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
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
);