aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/Makefile.am
blob: 8eab140896a4792b3ec621b68bb3e86d3a6064ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Copyright (c) 2017 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
AM_LIBTOOLFLAGS = --quiet

AM_CXXFLAGS = -Wall -std=gnu++11 -I${top_srcdir} -I${top_builddir}/vpp-api/vapi/ -I$(top_srcdir)/vpp-api/ -I${libdir}/../include -O0
AM_LDFLAGS = -shared -no-undefined

bin_PROGRAMS =
noinst_LTLIBRARIES =
CLEANDIRS =

lib_LTLIBRARIES = libvom.la

libvom_la_DEPENDENCIES =
libvom_la_LIBADD = 					\
	$(top_builddir)/vpp-api/vapi/libvapiclient.la	\
	-lpthread					\
	-lboost_thread					\
	$(BOOST_SYSTEM_LIB) 				\
	$(BOOST_FILESYSTEM_LIB) 			\
	$(BOOST_ASIO_LIB) 				\
	-lm -lrt

libvom_la_SOURCES = 			\
	types.cpp			\
	acl_binding_cmds.cpp		\
	acl_binding.cpp			\
	acl_l2_rule.cpp			\
	acl_l3_rule.cpp			\
	acl_list_cmds.cpp		\
	acl_list.cpp			\
	acl_types.cpp			\
	arp_proxy_binding_cmds.cpp 	\
	arp_proxy_binding.cpp		\
	arp_proxy_config_cmds.cpp	\
	arp_proxy_config.cpp		\
	bridge_domain_cmds.cpp		\
	bridge_domain.cpp		\
	bridge_domain_arp_entry.cpp	\
	bridge_domain_arp_entry_cmds.cpp \
	bridge_domain_entry_cmds.cpp	\
	bridge_domain_entry.cpp		\
	client_db.cpp			\
	cmd.cpp				\
	connection.cpp			\
	dhcp_config_cmds.cpp		\
	dhcp_config.cpp			\
	hw_cmds.cpp			\
	hw.cpp				\
	inspect.cpp			\
	interface_cmds.cpp		\
	interface.cpp			\
	interface_factory.cpp		\
	interface_ip6_nd_cmds.cpp	\
	interface_span_cmds.cpp		\
	interface_span.cpp		\
	interface_types.cpp		\
	ip_unnumbered_cmds.cpp		\
	ip_unnumbered.cpp		\
	l2_binding_cmds.cpp		\
	l2_binding.cpp			\
	l3_binding_cmds.cpp		\
	l3_binding.cpp			\
	lldp_binding_cmds.cpp		\
	lldp_binding.cpp		\
	lldp_global_cmds.cpp		\
	lldp_global.cpp			\
	logger.cpp			\
	nat_static.cpp			\
	nat_static_cmds.cpp		\
	nat_binding.cpp			\
	nat_binding_cmds.cpp		\
	neighbour.cpp			\
	neighbour_cmds.cpp		\
	object_base.cpp			\
	om.cpp				\
	prefix.cpp			\
	ra_config.cpp			\
	ra_prefix.cpp			\
	route.cpp			\
	route_cmds.cpp			\
	route_domain.cpp		\
	route_domain_cmds.cpp		\
	sub_interface_cmds.cpp		\
	sub_interface.cpp		\
	tap_interface.cpp		\
	tap_interface_cmds.cpp		\
	vxlan_tunnel_cmds.cpp 		\
	vxlan_tunnel.cpp

vomincludedir = $(includedir)/vom

vominclude_HEADERS =			\
	acl_binding.hpp			\
	acl_l2_rule.hpp			\
	acl_l3_rule.hpp			\
	acl_list.hpp			\
	acl_types.hpp			\
	arp_proxy_binding.hpp		\
	arp_proxy_config.hpp		\
	bridge_domain.hpp		\
	bridge_domain_arp_entry.hpp	\
	bridge_domain_entry.hpp		\
	client_db.hpp			\
	cmd.hpp				\
	connection.hpp			\
	dhcp_config.hpp			\
	dhcp_config_cmds.hpp		\
	dump_cmd.hpp			\
	enum_base.hpp			\
	event_cmd.hpp			\
	hw.hpp				\
	inspect.hpp			\
	interface.hpp			\
	interface_cmds.hpp		\
	interface_ip6_nd.hpp		\
	interface_span.hpp		\
	ip_unnumbered.hpp		\
	l2_binding.hpp			\
	l3_binding.hpp			\
	lldp_binding.hpp		\
	lldp_global.hpp			\
	logger.hpp			\
	nat_static.hpp			\
	nat_binding.hpp			\
	neighbour.hpp			\
	object_base.hpp			\
	om.hpp				\
	prefix.hpp			\
	ra_config.hpp			\
	ra_prefix.hpp			\
	route.hpp			\
	route_domain.hpp		\
	rpc_cmd.hpp			\
	singular_db.hpp			\
	sub_interface.hpp		\
	tap_interface.hpp		\
	types.hpp			\
	vxlan_tunnel.hpp

# vi:syntax=automake
.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2016 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <vnet/ip/ip.h>

#include <vnet/fib/fib_types.h>
#include <vnet/fib/fib_internal.h>
#include <vnet/mpls/mpls.h>

/*
 * arrays of protocol and link names
 */
static const char* fib_protocol_names[] = FIB_PROTOCOLS;
static const char* vnet_link_names[] = VNET_LINKS;
static const char* fib_forw_chain_names[] = FIB_FORW_CHAINS;

u8 *
format_fib_protocol (u8 * s, va_list * ap)
{
    fib_protocol_t proto = va_arg(*ap, int); // fib_protocol_t promotion

    return (format (s, "%s", fib_protocol_names[proto]));
}

u8 *
format_vnet_link (u8 * s, va_list * ap)
{
    vnet_link_t link = va_arg(*ap, int); // vnet_link_t promotion

    return (format (s, "%s", vnet_link_names[link]));
}

u8 *
format_fib_forw_chain_type (u8 * s, va_list * args)
{
    fib_forward_chain_type_t fct = va_arg(*args, int);

    return (format (s, "%s", fib_forw_chain_names[fct]));
}

void
fib_prefix_from_ip46_addr (const ip46_address_t *addr,
			   fib_prefix_t *pfx)
{
    ASSERT(!ip46_address_is_zero(addr));

    pfx->fp_proto = ((ip46_address_is_ip4(addr) ?
		      FIB_PROTOCOL_IP4 :
		      FIB_PROTOCOL_IP6));
    pfx->fp_len = ((ip46_address_is_ip4(addr) ?
		    32 : 128));
    pfx->fp_addr = *addr;
}

void
fib_prefix_from_mpls_label (mpls_label_t label,
                            mpls_eos_bit_t eos,
			    fib_prefix_t *pfx)
{
    pfx->fp_proto = FIB_PROTOCOL_MPLS;
    pfx->fp_len = 21;
    pfx->fp_label = label;
    pfx->fp_eos = eos;
}

int
fib_prefix_cmp (const fib_prefix_t *p1,
		const fib_prefix_t *p2)
{
    int res;

    res = (p1->fp_proto - p2->fp_proto);

    if (0 == res)
    {
	switch (p1->fp_proto)
	{
	case FIB_PROTOCOL_IP4:
	case FIB_PROTOCOL_IP6:
	    res = (p1->fp_len - p2->fp_len);

	    if (0 == res)
	    {
		res = ip46_address_cmp(&p1->fp_addr, &p2->fp_addr);
	    }
	    break;
	case FIB_PROTOCOL_MPLS:
	    res = (p1->fp_label - p2->fp_label);

	    if (0 == res)
	    {
		res = (p1->fp_eos - p2->fp_eos);
	    }
	    break;
	}
    }

    return (res);
}

int
fib_prefix_is_cover (const fib_prefix_t *p1,
		     const fib_prefix_t *p2)
{
    switch (p1->fp_proto)
    {
    case FIB_PROTOCOL_IP4:
	return (ip4_destination_matches_route(&ip4_main,
					      &p1->fp_addr.ip4,
					      &p2->fp_addr.ip4,
					      p1->fp_len));
    case FIB_PROTOCOL_IP6:
	return (ip6_destination_matches_route(&ip6_main,
					      &p1->fp_addr.ip6,
					      &p2->fp_addr.ip6,
					      p1->fp_len));
    case FIB_PROTOCOL_MPLS:
	break;
    }
    return (0);
}

int
fib_prefix_is_host (const fib_prefix_t *prefix)
{
    switch (prefix->fp_proto)
    {
    case FIB_PROTOCOL_IP4:
	return (prefix->fp_len == 32);
    case FIB_PROTOCOL_IP6:
	return (prefix->fp_len == 128);
    case FIB_PROTOCOL_MPLS:
	return (!0);
    }
    return (0);
}

u8 *
format_fib_prefix (u8 * s, va_list * args)
{
    fib_prefix_t *fp = va_arg (*args, fib_prefix_t *);

    /*
     * protocol specific so it prints ::/0 correctly.
     */
    switch (fp->fp_proto)
    {
    case FIB_PROTOCOL_IP6:
    {
	ip6_address_t p6 = fp->fp_addr.ip6;

	ip6_address_mask(&p6, &(ip6_main.fib_masks[fp->fp_len]));
	s = format (s, "%U", format_ip6_address, &p6);
	break;
    }
    case FIB_PROTOCOL_IP4:
    {
	ip4_address_t p4 = fp->fp_addr.ip4;
	p4.as_u32 &= ip4_main.fib_masks[fp->fp_len];

	s = format (s, "%U", format_ip4_address, &p4);
	break;
    }
    case FIB_PROTOCOL_MPLS:
	s = format (s, "%U:%U",
		    format_mpls_unicast_label, fp->fp_label,
		    format_mpls_eos_bit, fp->fp_eos);
	break;
    }
    s = format (s, "/%d", fp->fp_len);

    return (s);
}

int
fib_route_path_cmp (const fib_route_path_t *rpath1,
		    const fib_route_path_t *rpath2)
{
    int res;

    res = ip46_address_cmp(&rpath1->frp_addr,
			   &rpath2->frp_addr);

    if (0 != res) return (res);

    res = (rpath1->frp_sw_if_index - rpath2->frp_sw_if_index);

    if (0 != res) return (res);

    if (ip46_address_is_zero(&rpath1->frp_addr))
    {
	res = rpath1->frp_fib_index - rpath2->frp_fib_index;
    }

    return (res);
}

dpo_proto_t
fib_proto_to_dpo (fib_protocol_t fib_proto)
{
    switch (fib_proto)
    {
    case FIB_PROTOCOL_IP6:
        return (DPO_PROTO_IP6);
    case FIB_PROTOCOL_IP4:
        return (DPO_PROTO_IP4);
    case FIB_PROTOCOL_MPLS:
        return (DPO_PROTO_MPLS);
    }
    ASSERT(0);
    return (0);
}

fib_protocol_t
dpo_proto_to_fib (dpo_proto_t dpo_proto)
{
    switch (dpo_proto)
    {
    case DPO_PROTO_IP6:
        return (FIB_PROTOCOL_IP6);
    case DPO_PROTO_IP4:
        return (FIB_PROTOCOL_IP4);
    case DPO_PROTO_MPLS:
        return (FIB_PROTOCOL_MPLS);
    default:
	break;
    }
    ASSERT(0);
    return (0);
}

vnet_link_t
fib_proto_to_link (fib_protocol_t proto)
{
    switch (proto)
    {
    case FIB_PROTOCOL_IP4:
	return (VNET_LINK_IP4);
    case FIB_PROTOCOL_IP6:
	return (VNET_LINK_IP6);
    case FIB_PROTOCOL_MPLS:
	return (VNET_LINK_MPLS);
    }
    ASSERT(0);
    return (0);
}

fib_forward_chain_type_t
fib_forw_chain_type_from_dpo_proto (dpo_proto_t proto)
{
    switch (proto)
    {
    case DPO_PROTO_IP4:
	return (FIB_FORW_CHAIN_TYPE_UNICAST_IP4);
    case DPO_PROTO_IP6:
	return (FIB_FORW_CHAIN_TYPE_UNICAST_IP6);
    case DPO_PROTO_MPLS:
	return (FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS);
    case DPO_PROTO_ETHERNET:
	return (FIB_FORW_CHAIN_TYPE_ETHERNET);
    case DPO_PROTO_NSH:
        return (FIB_FORW_CHAIN_TYPE_NSH);
    case DPO_PROTO_BIER:
	return (FIB_FORW_CHAIN_TYPE_BIER);
    }
    ASSERT(0);
    return (FIB_FORW_CHAIN_TYPE_UNICAST_IP4);
}

vnet_link_t
fib_forw_chain_type_to_link_type (fib_forward_chain_type_t fct)
{
    switch (fct)
    {
    case FIB_FORW_CHAIN_TYPE_UNICAST_IP4:
    case FIB_FORW_CHAIN_TYPE_MCAST_IP4:
	return (VNET_LINK_IP4);
    case FIB_FORW_CHAIN_TYPE_UNICAST_IP6:
    case FIB_FORW_CHAIN_TYPE_MCAST_IP6:
	return (VNET_LINK_IP6);
    case FIB_FORW_CHAIN_TYPE_ETHERNET:
	return (VNET_LINK_ETHERNET);
    case FIB_FORW_CHAIN_TYPE_NSH:
        return (VNET_LINK_NSH);
    case FIB_FORW_CHAIN_TYPE_MPLS_EOS:
    case FIB_FORW_CHAIN_TYPE_BIER:
	/*
	 * insufficient information to to convert
	 */
	ASSERT(0);
	break;
    case FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS:
	return (VNET_LINK_MPLS);
    }
    return (VNET_LINK_IP4);
}

dpo_proto_t
fib_forw_chain_type_to_dpo_proto (fib_forward_chain_type_t fct)
{
    switch (fct)
    {
    case FIB_FORW_CHAIN_TYPE_UNICAST_IP4:
    case FIB_FORW_CHAIN_TYPE_MCAST_IP4:
	return (DPO_PROTO_IP4);
    case FIB_FORW_CHAIN_TYPE_UNICAST_IP6:
    case FIB_FORW_CHAIN_TYPE_MCAST_IP6:
	return (DPO_PROTO_IP6);
    case FIB_FORW_CHAIN_TYPE_ETHERNET:
	return (DPO_PROTO_ETHERNET);
    case FIB_FORW_CHAIN_TYPE_NSH:
        return (DPO_PROTO_NSH);
    case FIB_FORW_CHAIN_TYPE_BIER:
	return (DPO_PROTO_BIER);
    case FIB_FORW_CHAIN_TYPE_MPLS_EOS:
    case FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS:
	return (DPO_PROTO_MPLS);
    }
    return (DPO_PROTO_IP4);
}

uword
unformat_fib_route_path (unformat_input_t * input, va_list * args)
{
    fib_route_path_t *rpath = va_arg (*args, fib_route_path_t *);
    u32 *payload_proto = va_arg (*args, u32*);
    u32 weight, preference, udp_encap_id;
    mpls_label_t out_label;
    vnet_main_t *vnm;

    vnm = vnet_get_main ();
    memset(rpath, 0, sizeof(*rpath));
    rpath->frp_weight = 1;
    rpath->frp_sw_if_index = ~0;

    while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
    {
        if (unformat (input, "%U %U",
                      unformat_ip4_address,
                      &rpath->frp_addr.ip4,
                      unformat_vnet_sw_interface, vnm,
                      &rpath->frp_sw_if_index))
        {
            rpath->frp_proto = DPO_PROTO_IP4;
        }
        else if (unformat (input, "%U %U",
                           unformat_ip6_address,
                           &rpath->frp_addr.ip6,
                           unformat_vnet_sw_interface, vnm,
                           &rpath->frp_sw_if_index))
        {
            rpath->frp_proto = DPO_PROTO_IP6;
        }
        else if (unformat (input, "weight %u", &weight))
        {
            rpath->frp_weight = weight;
        }
        else if (unformat (input, "preference %u", &preference))
        {
            rpath->frp_preference = preference;
        }
        else if (unformat (input, "%U next-hop-table %d",
                           unformat_ip4_address,
                           &rpath->frp_addr.ip4,
                           &rpath->frp_fib_index))
        {
            rpath->frp_sw_if_index = ~0;
            rpath->frp_proto = DPO_PROTO_IP4;
        }
        else if (unformat (input, "%U next-hop-table %d",
                           unformat_ip6_address,
                           &rpath->frp_addr.ip6,
                           &rpath->frp_fib_index))
        {
            rpath->frp_sw_if_index = ~0;
            rpath->frp_proto = DPO_PROTO_IP6;
        }
        else if (unformat (input, "%U",
                           unformat_ip4_address,
                           &rpath->frp_addr.ip4))
        {
            /*
             * the recursive next-hops are by default in the default table
             */
            rpath->frp_fib_index = 0;
            rpath->frp_sw_if_index = ~0;
            rpath->frp_proto = DPO_PROTO_IP4;
        }
        else if (unformat (input, "%U",
                           unformat_ip6_address,
                           &rpath->frp_addr.ip6))
        {
            rpath->frp_fib_index = 0;
            rpath->frp_sw_if_index = ~0;
            rpath->frp_proto = DPO_PROTO_IP6;
        }
        else if (unformat (input, "udp-encap %d", &udp_encap_id))
        {
            rpath->frp_udp_encap_id = udp_encap_id;
            rpath->frp_flags |= FIB_ROUTE_PATH_UDP_ENCAP;
            rpath->frp_proto = *payload_proto;
        }
        else if (unformat (input, "lookup in table %d", &rpath->frp_fib_index))
        {
            rpath->frp_proto = *payload_proto;
            rpath->frp_sw_if_index = ~0;
        }
        else if (unformat (input, "via %U",
                           unformat_vnet_sw_interface, vnm,
                           &rpath->frp_sw_if_index))
        {
            rpath->frp_proto = *payload_proto;
        }
        else if (unformat (input, "resolve-via-host"))
        {
            rpath->frp_flags |= FIB_ROUTE_PATH_RESOLVE_VIA_HOST;
        }
        else if (unformat (input, "resolve-via-attached"))
        {
            rpath->frp_flags |= FIB_ROUTE_PATH_RESOLVE_VIA_ATTACHED;
        }
        else if (unformat (input,
                           "ip4-lookup-in-table %d",
                           &rpath->frp_fib_index))
        {
            rpath->frp_proto = DPO_PROTO_IP4;
            *payload_proto = DPO_PROTO_IP4;
        }
        else if (unformat (input,
                           "ip6-lookup-in-table %d",
                           &rpath->frp_fib_index))
        {
            rpath->frp_proto = DPO_PROTO_IP6;
            *payload_proto = DPO_PROTO_IP6;
        }
        else if (unformat (input,
                           "mpls-lookup-in-table %d",
                           &rpath->frp_fib_index))
        {
            rpath->frp_proto = DPO_PROTO_MPLS;
            *payload_proto = DPO_PROTO_MPLS;
        }
        else if (unformat (input,
                           "l2-input-on %U",
                           unformat_vnet_sw_interface, vnm,
                           &rpath->frp_sw_if_index))
        {
            rpath->frp_proto = DPO_PROTO_ETHERNET;
            *payload_proto = DPO_PROTO_ETHERNET;
        }
        else if (unformat (input, "via-label %U",
                           unformat_mpls_unicast_label,
                           &rpath->frp_local_label))
        {
            rpath->frp_eos = MPLS_NON_EOS;
            rpath->frp_proto = DPO_PROTO_MPLS;
            rpath->frp_sw_if_index = ~0;
        }
        else if (unformat (input, "rx-ip4 %U",
                           unformat_vnet_sw_interface, vnm,
                           &rpath->frp_sw_if_index))
        {
            rpath->frp_proto = DPO_PROTO_IP4;
            rpath->frp_flags = FIB_ROUTE_PATH_INTF_RX;
        }
        else if (unformat (input, "out-labels"))
        {
            while (unformat (input, "%U",
                             unformat_mpls_unicast_label, &out_label))
            {
                vec_add1(rpath->frp_label_stack, out_label);
            }
        }
        else
        {
            return (0);
        }
    }

    return (1);
}