]>
git.proxmox.com Git - mirror_frr.git/blob - zebra/zebra_mpls_null.c
2 * Copyright (C) 2016 by Open Source Routing.
4 * This file is part of GNU Zebra.
6 * GNU Zebra is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #include "zebra/zebra_mpls.h"
25 int kernel_add_lsp (zebra_lsp_t
*lsp
) { return 0; }
26 int kernel_upd_lsp (zebra_lsp_t
*lsp
) { return 0; }
27 int kernel_del_lsp (zebra_lsp_t
*lsp
) { return 0; }
28 int mpls_kernel_init (void) { return -1; };
33 mpls_label2str (u_int8_t num_labels
, mpls_label_t
*labels
,
34 char *buf
, int len
, int pretty
)
40 mpls_str2label (const char *label_str
, u_int8_t
*num_labels
,
47 zebra_mpls_label_block_add (struct zebra_vrf
*vrf
, u_int32_t start_label
,
54 zebra_mpls_label_block_del (struct zebra_vrf
*zvrf
)
60 zebra_mpls_write_label_block_config (struct vty
*vty
, struct zebra_vrf
*zvrf
)
66 zebra_mpls_lsp_install (struct zebra_vrf
*zvrf
, struct route_node
*rn
, struct rib
*rib
)
72 zebra_mpls_lsp_uninstall (struct zebra_vrf
*zvrf
, struct route_node
*rn
, struct rib
*rib
)
78 zebra_mpls_init_tables (struct zebra_vrf
*zvrf
)
83 zebra_mpls_print_lsp (struct vty
*vty
, struct zebra_vrf
*zvrf
, mpls_label_t label
,
89 zebra_mpls_print_lsp_table (struct vty
*vty
, struct zebra_vrf
*zvrf
,
95 zebra_mpls_write_lsp_config (struct vty
*vty
, struct zebra_vrf
*zvrf
)
102 zebra_mpls_lsp_label_consistent (struct zebra_vrf
*zvrf
, mpls_label_t in_label
,
103 mpls_label_t out_label
, enum nexthop_types_t gtype
,
104 union g_addr
*gate
, ifindex_t ifindex
)
111 zebra_mpls_static_lsp_add (struct zebra_vrf
*zvrf
, mpls_label_t in_label
,
112 mpls_label_t out_label
, enum nexthop_types_t gtype
,
113 union g_addr
*gate
, ifindex_t ifindex
)
119 zebra_mpls_static_lsp_del (struct zebra_vrf
*zvrf
, mpls_label_t in_label
,
120 enum nexthop_types_t gtype
, union g_addr
*gate
,
127 zebra_mpls_lsp_schedule (struct zebra_vrf
*zvrf
)
132 zebra_mpls_close_tables (struct zebra_vrf
*zvrf
)
137 zebra_mpls_fec_for_label (struct zebra_vrf
*zvrf
, mpls_label_t label
)
143 zebra_mpls_label_already_bound (struct zebra_vrf
*zvrf
, mpls_label_t label
)
149 zebra_mpls_static_fec_add (struct zebra_vrf
*zvrf
, struct prefix
*p
,
150 mpls_label_t in_label
)
156 zebra_mpls_static_fec_del (struct zebra_vrf
*zvrf
, struct prefix
*p
)
162 zebra_mpls_write_fec_config (struct vty
*vty
, struct zebra_vrf
*zvrf
)
168 zebra_mpls_print_fec_table (struct vty
*vty
, struct zebra_vrf
*zvrf
)
173 zebra_mpls_print_fec (struct vty
*vty
, struct zebra_vrf
*zvrf
, struct prefix
*p
)
178 zebra_mpls_fec_register (struct zebra_vrf
*zvrf
, struct prefix
*p
,
179 u_int32_t label_index
, struct zserv
*client
)
185 zebra_mpls_fec_unregister (struct zebra_vrf
*zvrf
, struct prefix
*p
,
186 struct zserv
*client
)
192 zebra_mpls_cleanup_fecs_for_client (struct zebra_vrf
*zvrf
, struct zserv
*client
)
197 void mpls_ldp_lsp_uninstall_all (struct hash_backet
*backet
, void *ctxt
)
202 void mpls_ldp_ftn_uninstall_all (struct zebra_vrf
*zvrf
, int afi
)
207 void zebra_mpls_init (void)
212 int mpls_lsp_install (struct zebra_vrf
*zvrf
, enum lsp_types_t type
,
213 mpls_label_t in_label
, mpls_label_t out_label
,
214 enum nexthop_types_t gtype
, union g_addr
*gate
,
220 int mpls_lsp_uninstall (struct zebra_vrf
*zvrf
, enum lsp_types_t type
,
221 mpls_label_t in_label
, enum nexthop_types_t gtype
,
222 union g_addr
*gate
, ifindex_t ifindex
)
227 int mpls_ftn_update (int add
, struct zebra_vrf
*zvrf
, enum lsp_types_t type
,
228 struct prefix
*prefix
, enum nexthop_types_t gtype
,
229 union g_addr
*gate
, ifindex_t ifindex
, u_int8_t distance
,
230 mpls_label_t out_label
)