Line | Count | Source |
1 | | // SPDX-License-Identifier: GPL-2.0-or-later |
2 | | /* |
3 | | * MPLS definitions |
4 | | * Copyright 2015 Cumulus Networks, Inc. |
5 | | */ |
6 | | |
7 | | #ifndef _QUAGGA_MPLS_H |
8 | | #define _QUAGGA_MPLS_H |
9 | | |
10 | | #include <zebra.h> |
11 | | #include <vxlan.h> |
12 | | #include <arpa/inet.h> |
13 | | |
14 | | #ifdef __cplusplus |
15 | | extern "C" { |
16 | | #endif |
17 | | |
18 | | #ifdef MPLS_LABEL_MAX |
19 | | #undef MPLS_LABEL_MAX |
20 | | #endif |
21 | | |
22 | | #define MPLS_LABEL_HELPSTR \ |
23 | | "Specify label(s) for this route\nOne or more " \ |
24 | | "labels in the range (16-1048575) separated by '/'\n" |
25 | | |
26 | | /* Well-known MPLS label values (RFC 3032 etc). */ |
27 | 0 | #define MPLS_LABEL_IPV4_EXPLICIT_NULL 0 /* [RFC3032] */ |
28 | 0 | #define MPLS_LABEL_ROUTER_ALERT 1 /* [RFC3032] */ |
29 | 0 | #define MPLS_LABEL_IPV6_EXPLICIT_NULL 2 /* [RFC3032] */ |
30 | 1.23k | #define MPLS_LABEL_IMPLICIT_NULL 3 /* [RFC3032] */ |
31 | 0 | #define MPLS_LABEL_ELI 7 /* [RFC6790] */ |
32 | 0 | #define MPLS_LABEL_GAL 13 /* [RFC5586] */ |
33 | 0 | #define MPLS_LABEL_OAM_ALERT 14 /* [RFC3429] */ |
34 | 0 | #define MPLS_LABEL_EXTENSION 15 /* [RFC7274] */ |
35 | 0 | #define MPLS_LABEL_MAX 1048575 |
36 | | #define MPLS_LABEL_VALUE_MASK 0x000FFFFF |
37 | 1.79k | #define MPLS_LABEL_NONE 0xFFFFFFFF /* for internal use only */ |
38 | | |
39 | | /* Minimum and maximum label values */ |
40 | 0 | #define MPLS_LABEL_RESERVED_MIN 0 |
41 | 0 | #define MPLS_LABEL_RESERVED_MAX 15 |
42 | 0 | #define MPLS_LABEL_UNRESERVED_MIN 16 |
43 | 0 | #define MPLS_LABEL_UNRESERVED_MAX 1048575 |
44 | 0 | #define MPLS_LABEL_BASE_ANY 0 |
45 | | |
46 | | /* Default min and max SRGB label range */ |
47 | | /* Even if the SRGB allows to manage different Label space between routers, |
48 | | * if an operator want to use the same SRGB for all its router, we must fix |
49 | | * a common range. However, Cisco start its SRGB at 16000 and Juniper ends |
50 | | * its SRGB at 16384 for OSPF. Thus, by fixing the minimum SRGB label to |
51 | | * 8000 we could deal with both Cisco and Juniper. |
52 | | */ |
53 | 1 | #define MPLS_DEFAULT_MIN_SRGB_LABEL 8000 |
54 | 1 | #define MPLS_DEFAULT_MAX_SRGB_LABEL 50000 |
55 | | #define MPLS_DEFAULT_MIN_SRGB_SIZE 5000 |
56 | | #define MPLS_DEFAULT_MAX_SRGB_SIZE 20000 |
57 | | |
58 | | /* Maximum # labels that can be pushed. */ |
59 | 5 | #define MPLS_MAX_LABELS 16 |
60 | | |
61 | | #define IS_MPLS_RESERVED_LABEL(label) (label <= MPLS_LABEL_RESERVED_MAX) |
62 | | |
63 | | #define IS_MPLS_UNRESERVED_LABEL(label) \ |
64 | 0 | (label >= MPLS_LABEL_UNRESERVED_MIN \ |
65 | 0 | && label <= MPLS_LABEL_UNRESERVED_MAX) |
66 | | |
67 | | /* Definitions for a MPLS label stack entry (RFC 3032). This encodes the |
68 | | * label, EXP, BOS and TTL fields. |
69 | | */ |
70 | | typedef unsigned int mpls_lse_t; |
71 | | |
72 | 0 | #define MPLS_LS_LABEL_MASK 0xFFFFF000 |
73 | 0 | #define MPLS_LS_LABEL_SHIFT 12 |
74 | 0 | #define MPLS_LS_EXP_MASK 0x00000E00 |
75 | 0 | #define MPLS_LS_EXP_SHIFT 9 |
76 | 0 | #define MPLS_LS_S_MASK 0x00000100 |
77 | 0 | #define MPLS_LS_S_SHIFT 8 |
78 | 0 | #define MPLS_LS_TTL_MASK 0x000000FF |
79 | 0 | #define MPLS_LS_TTL_SHIFT 0 |
80 | | |
81 | | #define MPLS_LABEL_VALUE(lse) \ |
82 | 0 | ((lse & MPLS_LS_LABEL_MASK) >> MPLS_LS_LABEL_SHIFT) |
83 | 0 | #define MPLS_LABEL_EXP(lse) ((lse & MPLS_LS_EXP_MASK) >> MPLS_LS_EXP_SHIFT) |
84 | 0 | #define MPLS_LABEL_BOS(lse) ((lse & MPLS_LS_S_MASK) >> MPLS_LS_S_SHIFT) |
85 | 0 | #define MPLS_LABEL_TTL(lse) ((lse & MPLS_LS_TTL_MASK) >> MPLS_LS_TTL_SHIFT) |
86 | | |
87 | | #define IS_MPLS_LABEL_BOS(ls) (MPLS_LABEL_BOS(ls) == 1) |
88 | | |
89 | 0 | #define MPLS_LABEL_LEN_BITS 20 |
90 | | |
91 | | /* MPLS label value as a 32-bit (mostly we only care about the label value). */ |
92 | | typedef unsigned int mpls_label_t; |
93 | | |
94 | | struct mpls_label_stack { |
95 | | uint8_t num_labels; |
96 | | uint8_t reserved[3]; |
97 | | mpls_label_t label[0]; /* 1 or more labels */ |
98 | | }; |
99 | | |
100 | | /* The MPLS explicit-null label is 0 which means when you memset a mpls_label_t |
101 | | * to zero you have set that variable to explicit-null which was probably not |
102 | | * your intent. The work-around is to use one bit to indicate if the |
103 | | * mpls_label_t has been set by the user. MPLS_INVALID_LABEL has this bit clear |
104 | | * so that we can use MPLS_INVALID_LABEL to initialize mpls_label_t variables. |
105 | | */ |
106 | 9.64k | #define MPLS_INVALID_LABEL 0xFFFDFFFF |
107 | | |
108 | | /* LSP types. */ |
109 | | enum lsp_types_t { |
110 | | ZEBRA_LSP_NONE = 0, /* No LSP. */ |
111 | | ZEBRA_LSP_STATIC = 1, /* Static LSP. */ |
112 | | ZEBRA_LSP_LDP = 2, /* LDP LSP. */ |
113 | | ZEBRA_LSP_BGP = 3, /* BGP LSP. */ |
114 | | ZEBRA_LSP_OSPF_SR = 4,/* OSPF Segment Routing LSP. */ |
115 | | ZEBRA_LSP_ISIS_SR = 5,/* IS-IS Segment Routing LSP. */ |
116 | | ZEBRA_LSP_SHARP = 6, /* Identifier for test protocol */ |
117 | | ZEBRA_LSP_SRTE = 7, /* SR-TE LSP */ |
118 | | ZEBRA_LSP_EVPN = 8, /* EVPN VNI Label */ |
119 | | }; |
120 | | |
121 | | /* Functions for basic label operations. */ |
122 | | |
123 | | static inline void vni2label(vni_t vni, mpls_label_t *label) |
124 | 0 | { |
125 | 0 | uint8_t *tag = (uint8_t *)label; |
126 | |
|
127 | 0 | assert(tag); |
128 | |
|
129 | 0 | tag[0] = (vni >> 16) & 0xFF; |
130 | 0 | tag[1] = (vni >> 8) & 0xFF; |
131 | 0 | tag[2] = vni & 0xFF; |
132 | 0 | } Unexecuted instantiation: ospf_main.c:vni2label Unexecuted instantiation: ospf_bfd.c:vni2label Unexecuted instantiation: ospf_dump.c:vni2label Unexecuted instantiation: ospf_dump_api.c:vni2label Unexecuted instantiation: ospf_interface.c:vni2label Unexecuted instantiation: ospf_lsa.c:vni2label Unexecuted instantiation: ospf_lsdb.c:vni2label Unexecuted instantiation: ospf_neighbor.c:vni2label Unexecuted instantiation: ospf_network.c:vni2label Unexecuted instantiation: ospf_nsm.c:vni2label Unexecuted instantiation: ospf_opaque.c:vni2label Unexecuted instantiation: ospf_packet.c:vni2label Unexecuted instantiation: ospf_ri.c:vni2label Unexecuted instantiation: ospf_routemap.c:vni2label Unexecuted instantiation: ospf_routemap_nb.c:vni2label Unexecuted instantiation: ospf_routemap_nb_config.c:vni2label Unexecuted instantiation: ospf_spf.c:vni2label Unexecuted instantiation: ospf_ti_lfa.c:vni2label Unexecuted instantiation: ospf_sr.c:vni2label Unexecuted instantiation: ospf_te.c:vni2label Unexecuted instantiation: ospf_vty.c:vni2label Unexecuted instantiation: ospf_zebra.c:vni2label Unexecuted instantiation: ospfd.c:vni2label Unexecuted instantiation: ospf_gr_helper.c:vni2label Unexecuted instantiation: ospf_abr.c:vni2label Unexecuted instantiation: ospf_apiserver.c:vni2label Unexecuted instantiation: ospf_asbr.c:vni2label Unexecuted instantiation: ospf_ase.c:vni2label Unexecuted instantiation: ospf_ext.c:vni2label Unexecuted instantiation: ospf_flood.c:vni2label Unexecuted instantiation: ospf_gr.c:vni2label Unexecuted instantiation: ospf_ia.c:vni2label Unexecuted instantiation: ospf_ism.c:vni2label Unexecuted instantiation: ospf_ldp_sync.c:vni2label Unexecuted instantiation: ospf_route.c:vni2label Unexecuted instantiation: ospf_api.c:vni2label Unexecuted instantiation: affinitymap.c:vni2label Unexecuted instantiation: affinitymap_cli.c:vni2label Unexecuted instantiation: affinitymap_northbound.c:vni2label Unexecuted instantiation: bfd.c:vni2label Unexecuted instantiation: command.c:vni2label Unexecuted instantiation: cspf.c:vni2label Unexecuted instantiation: filter.c:vni2label Unexecuted instantiation: filter_cli.c:vni2label Unexecuted instantiation: filter_nb.c:vni2label Unexecuted instantiation: ldp_sync.c:vni2label Unexecuted instantiation: libfrr.c:vni2label Unexecuted instantiation: link_state.c:vni2label Unexecuted instantiation: log.c:vni2label Unexecuted instantiation: mgmt_be_client.c:vni2label Unexecuted instantiation: mgmt_fe_client.c:vni2label Unexecuted instantiation: mgmt_msg.c:vni2label Unexecuted instantiation: mlag.c:vni2label Unexecuted instantiation: mpls.c:vni2label Unexecuted instantiation: nexthop.c:vni2label Unexecuted instantiation: nexthop_group.c:vni2label Unexecuted instantiation: plist.c:vni2label Unexecuted instantiation: pullwr.c:vni2label Unexecuted instantiation: routemap.c:vni2label Unexecuted instantiation: routemap_cli.c:vni2label Unexecuted instantiation: routemap_northbound.c:vni2label Unexecuted instantiation: stream.c:vni2label Unexecuted instantiation: yang_wrappers.c:vni2label Unexecuted instantiation: zclient.c:vni2label Unexecuted instantiation: tc.c:vni2label Unexecuted instantiation: connected.c:vni2label Unexecuted instantiation: if_netlink.c:vni2label Unexecuted instantiation: interface.c:vni2label Unexecuted instantiation: ioctl.c:vni2label Unexecuted instantiation: kernel_netlink.c:vni2label Unexecuted instantiation: label_manager.c:vni2label Unexecuted instantiation: main.c:vni2label Unexecuted instantiation: netconf_netlink.c:vni2label Unexecuted instantiation: redistribute.c:vni2label Unexecuted instantiation: router-id.c:vni2label Unexecuted instantiation: rt_netlink.c:vni2label Unexecuted instantiation: rtadv.c:vni2label Unexecuted instantiation: rtread_netlink.c:vni2label Unexecuted instantiation: rule_netlink.c:vni2label Unexecuted instantiation: table_manager.c:vni2label Unexecuted instantiation: tc_netlink.c:vni2label Unexecuted instantiation: zapi_msg.c:vni2label Unexecuted instantiation: zebra_affinitymap.c:vni2label Unexecuted instantiation: zebra_dplane.c:vni2label Unexecuted instantiation: zebra_gr.c:vni2label Unexecuted instantiation: zebra_l2.c:vni2label Unexecuted instantiation: zebra_l2_bridge_if.c:vni2label Unexecuted instantiation: zebra_evpn.c:vni2label Unexecuted instantiation: zebra_evpn_mac.c:vni2label Unexecuted instantiation: zebra_evpn_neigh.c:vni2label Unexecuted instantiation: zebra_mlag.c:vni2label Unexecuted instantiation: zebra_mlag_vty.c:vni2label Unexecuted instantiation: zebra_mpls.c:vni2label Unexecuted instantiation: zebra_mpls_netlink.c:vni2label Unexecuted instantiation: zebra_mpls_null.c:vni2label Unexecuted instantiation: zebra_mpls_vty.c:vni2label Unexecuted instantiation: zebra_srv6.c:vni2label Unexecuted instantiation: zebra_srv6_vty.c:vni2label Unexecuted instantiation: zebra_mroute.c:vni2label Unexecuted instantiation: zebra_nb.c:vni2label Unexecuted instantiation: zebra_nb_config.c:vni2label Unexecuted instantiation: zebra_nb_rpcs.c:vni2label Unexecuted instantiation: zebra_nb_state.c:vni2label Unexecuted instantiation: zebra_netns_id.c:vni2label Unexecuted instantiation: zebra_netns_notify.c:vni2label Unexecuted instantiation: zebra_nhg.c:vni2label Unexecuted instantiation: zebra_ns.c:vni2label Unexecuted instantiation: zebra_opaque.c:vni2label Unexecuted instantiation: zebra_pbr.c:vni2label Unexecuted instantiation: zebra_ptm.c:vni2label Unexecuted instantiation: zebra_ptm_redistribute.c:vni2label Unexecuted instantiation: zebra_pw.c:vni2label Unexecuted instantiation: zebra_rib.c:vni2label Unexecuted instantiation: zebra_router.c:vni2label Unexecuted instantiation: zebra_rnh.c:vni2label Unexecuted instantiation: zebra_routemap.c:vni2label Unexecuted instantiation: zebra_routemap_nb_config.c:vni2label Unexecuted instantiation: zebra_script.c:vni2label Unexecuted instantiation: zebra_srte.c:vni2label Unexecuted instantiation: zebra_tc.c:vni2label Unexecuted instantiation: zebra_vrf.c:vni2label Unexecuted instantiation: zebra_vty.c:vni2label Unexecuted instantiation: zebra_vxlan.c:vni2label Unexecuted instantiation: zebra_vxlan_if.c:vni2label Unexecuted instantiation: zebra_evpn_mh.c:vni2label Unexecuted instantiation: zebra_neigh.c:vni2label Unexecuted instantiation: zserv.c:vni2label Unexecuted instantiation: debug_nl.c:vni2label Unexecuted instantiation: bgp_main.c:vni2label Unexecuted instantiation: bgp_attr.c:vni2label Unexecuted instantiation: bgp_attr_evpn.c:vni2label Unexecuted instantiation: bgp_clist.c:vni2label Unexecuted instantiation: bgp_community.c:vni2label Unexecuted instantiation: bgp_community_alias.c:vni2label Unexecuted instantiation: bgp_debug.c:vni2label Unexecuted instantiation: bgp_dump.c:vni2label Unexecuted instantiation: bgp_ecommunity.c:vni2label Unexecuted instantiation: bgp_evpn.c:vni2label Unexecuted instantiation: bgp_evpn_mh.c:vni2label Unexecuted instantiation: bgp_evpn_vty.c:vni2label Unexecuted instantiation: bgp_filter.c:vni2label Unexecuted instantiation: bgp_flowspec_vty.c:vni2label Unexecuted instantiation: bgp_fsm.c:vni2label Unexecuted instantiation: bgp_io.c:vni2label Unexecuted instantiation: bgp_keepalives.c:vni2label Unexecuted instantiation: bgp_labelpool.c:vni2label Unexecuted instantiation: bgp_lcommunity.c:vni2label Unexecuted instantiation: bgp_mac.c:vni2label Unexecuted instantiation: bgp_mpath.c:vni2label Unexecuted instantiation: bgp_mplsvpn.c:vni2label Unexecuted instantiation: bgp_network.c:vni2label Unexecuted instantiation: bgp_nexthop.c:vni2label Unexecuted instantiation: bgp_nht.c:vni2label Unexecuted instantiation: bgp_packet.c:vni2label Unexecuted instantiation: bgp_pbr.c:vni2label Unexecuted instantiation: bgp_rd.c:vni2label Unexecuted instantiation: bgp_regex.c:vni2label Unexecuted instantiation: bgp_route.c:vni2label Unexecuted instantiation: bgp_routemap.c:vni2label Unexecuted instantiation: bgp_routemap_nb.c:vni2label Unexecuted instantiation: bgp_routemap_nb_config.c:vni2label Unexecuted instantiation: bgp_table.c:vni2label Unexecuted instantiation: bgp_updgrp.c:vni2label Unexecuted instantiation: bgp_updgrp_adv.c:vni2label Unexecuted instantiation: bgp_updgrp_packet.c:vni2label Unexecuted instantiation: bgp_vpn.c:vni2label Unexecuted instantiation: bgp_vty.c:vni2label Unexecuted instantiation: bgp_zebra.c:vni2label Unexecuted instantiation: bgpd.c:vni2label Unexecuted instantiation: bgp_rfapi_cfg.c:vni2label Unexecuted instantiation: rfapi_import.c:vni2label Unexecuted instantiation: rfapi.c:vni2label Unexecuted instantiation: rfapi_ap.c:vni2label Unexecuted instantiation: rfapi_encap_tlv.c:vni2label Unexecuted instantiation: rfapi_nve_addr.c:vni2label Unexecuted instantiation: rfapi_monitor.c:vni2label Unexecuted instantiation: rfapi_rib.c:vni2label Unexecuted instantiation: rfapi_vty.c:vni2label Unexecuted instantiation: vnc_debug.c:vni2label Unexecuted instantiation: vnc_export_bgp.c:vni2label Unexecuted instantiation: vnc_export_table.c:vni2label Unexecuted instantiation: vnc_import_bgp.c:vni2label Unexecuted instantiation: vnc_zebra.c:vni2label Unexecuted instantiation: bgp_addpath.c:vni2label Unexecuted instantiation: bgp_advertise.c:vni2label Unexecuted instantiation: bgp_aspath.c:vni2label Unexecuted instantiation: bgp_bfd.c:vni2label Unexecuted instantiation: bgp_conditional_adv.c:vni2label Unexecuted instantiation: bgp_damp.c:vni2label Unexecuted instantiation: bgp_encap_tlv.c:vni2label Unexecuted instantiation: bgp_flowspec.c:vni2label Unexecuted instantiation: bgp_flowspec_util.c:vni2label Unexecuted instantiation: bgp_label.c:vni2label Unexecuted instantiation: bgp_open.c:vni2label Unexecuted instantiation: rfp_example.c:vni2label Unexecuted instantiation: pim_assert.c:vni2label Unexecuted instantiation: pim_bfd.c:vni2label Unexecuted instantiation: pim_bsm.c:vni2label Unexecuted instantiation: pim_cmd_common.c:vni2label Unexecuted instantiation: pim_hello.c:vni2label Unexecuted instantiation: pim_iface.c:vni2label Unexecuted instantiation: pim_ifchannel.c:vni2label Unexecuted instantiation: pim_instance.c:vni2label Unexecuted instantiation: pim_join.c:vni2label Unexecuted instantiation: pim_jp_agg.c:vni2label Unexecuted instantiation: pim_macro.c:vni2label Unexecuted instantiation: pim_mroute.c:vni2label Unexecuted instantiation: pim_msg.c:vni2label Unexecuted instantiation: pim_nb_config.c:vni2label Unexecuted instantiation: pim_neighbor.c:vni2label Unexecuted instantiation: pim_nht.c:vni2label Unexecuted instantiation: pim_oil.c:vni2label Unexecuted instantiation: pim_pim.c:vni2label Unexecuted instantiation: pim_routemap.c:vni2label Unexecuted instantiation: pim_rp.c:vni2label Unexecuted instantiation: pim_rpf.c:vni2label Unexecuted instantiation: pim_sock.c:vni2label Unexecuted instantiation: pim_ssm.c:vni2label Unexecuted instantiation: pim_ssmpingd.c:vni2label Unexecuted instantiation: pim_static.c:vni2label Unexecuted instantiation: pim_tib.c:vni2label Unexecuted instantiation: pim_tlv.c:vni2label Unexecuted instantiation: pim_upstream.c:vni2label Unexecuted instantiation: pim_util.c:vni2label Unexecuted instantiation: pim_vty.c:vni2label Unexecuted instantiation: pim_zebra.c:vni2label Unexecuted instantiation: pim_zlookup.c:vni2label Unexecuted instantiation: pim_vxlan.c:vni2label Unexecuted instantiation: pim_register.c:vni2label Unexecuted instantiation: pimd.c:vni2label Unexecuted instantiation: pim_cmd.c:vni2label Unexecuted instantiation: pim_igmp.c:vni2label Unexecuted instantiation: pim_igmp_mtrace.c:vni2label Unexecuted instantiation: pim_igmpv2.c:vni2label Unexecuted instantiation: pim_igmpv3.c:vni2label Unexecuted instantiation: pim_main.c:vni2label Unexecuted instantiation: pim_mlag.c:vni2label Unexecuted instantiation: pim_msdp.c:vni2label Unexecuted instantiation: pim_msdp_packet.c:vni2label Unexecuted instantiation: pim_msdp_socket.c:vni2label Unexecuted instantiation: pim_signals.c:vni2label Unexecuted instantiation: pim_zpthread.c:vni2label |
133 | | |
134 | | static inline vni_t label2vni(const mpls_label_t *label) |
135 | 0 | { |
136 | 0 | uint8_t *tag = (uint8_t *)label; |
137 | 0 | vni_t vni; |
138 | |
|
139 | 0 | assert(tag); |
140 | |
|
141 | 0 | vni = ((uint32_t)*tag++ << 16); |
142 | 0 | vni |= (uint32_t)*tag++ << 8; |
143 | 0 | vni |= (uint32_t)(*tag & 0xFF); |
144 | |
|
145 | 0 | return vni; |
146 | 0 | } Unexecuted instantiation: ospf_main.c:label2vni Unexecuted instantiation: ospf_bfd.c:label2vni Unexecuted instantiation: ospf_dump.c:label2vni Unexecuted instantiation: ospf_dump_api.c:label2vni Unexecuted instantiation: ospf_interface.c:label2vni Unexecuted instantiation: ospf_lsa.c:label2vni Unexecuted instantiation: ospf_lsdb.c:label2vni Unexecuted instantiation: ospf_neighbor.c:label2vni Unexecuted instantiation: ospf_network.c:label2vni Unexecuted instantiation: ospf_nsm.c:label2vni Unexecuted instantiation: ospf_opaque.c:label2vni Unexecuted instantiation: ospf_packet.c:label2vni Unexecuted instantiation: ospf_ri.c:label2vni Unexecuted instantiation: ospf_routemap.c:label2vni Unexecuted instantiation: ospf_routemap_nb.c:label2vni Unexecuted instantiation: ospf_routemap_nb_config.c:label2vni Unexecuted instantiation: ospf_spf.c:label2vni Unexecuted instantiation: ospf_ti_lfa.c:label2vni Unexecuted instantiation: ospf_sr.c:label2vni Unexecuted instantiation: ospf_te.c:label2vni Unexecuted instantiation: ospf_vty.c:label2vni Unexecuted instantiation: ospf_zebra.c:label2vni Unexecuted instantiation: ospfd.c:label2vni Unexecuted instantiation: ospf_gr_helper.c:label2vni Unexecuted instantiation: ospf_abr.c:label2vni Unexecuted instantiation: ospf_apiserver.c:label2vni Unexecuted instantiation: ospf_asbr.c:label2vni Unexecuted instantiation: ospf_ase.c:label2vni Unexecuted instantiation: ospf_ext.c:label2vni Unexecuted instantiation: ospf_flood.c:label2vni Unexecuted instantiation: ospf_gr.c:label2vni Unexecuted instantiation: ospf_ia.c:label2vni Unexecuted instantiation: ospf_ism.c:label2vni Unexecuted instantiation: ospf_ldp_sync.c:label2vni Unexecuted instantiation: ospf_route.c:label2vni Unexecuted instantiation: ospf_api.c:label2vni Unexecuted instantiation: affinitymap.c:label2vni Unexecuted instantiation: affinitymap_cli.c:label2vni Unexecuted instantiation: affinitymap_northbound.c:label2vni Unexecuted instantiation: bfd.c:label2vni Unexecuted instantiation: command.c:label2vni Unexecuted instantiation: cspf.c:label2vni Unexecuted instantiation: filter.c:label2vni Unexecuted instantiation: filter_cli.c:label2vni Unexecuted instantiation: filter_nb.c:label2vni Unexecuted instantiation: ldp_sync.c:label2vni Unexecuted instantiation: libfrr.c:label2vni Unexecuted instantiation: link_state.c:label2vni Unexecuted instantiation: log.c:label2vni Unexecuted instantiation: mgmt_be_client.c:label2vni Unexecuted instantiation: mgmt_fe_client.c:label2vni Unexecuted instantiation: mgmt_msg.c:label2vni Unexecuted instantiation: mlag.c:label2vni Unexecuted instantiation: mpls.c:label2vni Unexecuted instantiation: nexthop.c:label2vni Unexecuted instantiation: nexthop_group.c:label2vni Unexecuted instantiation: plist.c:label2vni Unexecuted instantiation: pullwr.c:label2vni Unexecuted instantiation: routemap.c:label2vni Unexecuted instantiation: routemap_cli.c:label2vni Unexecuted instantiation: routemap_northbound.c:label2vni Unexecuted instantiation: stream.c:label2vni Unexecuted instantiation: yang_wrappers.c:label2vni Unexecuted instantiation: zclient.c:label2vni Unexecuted instantiation: tc.c:label2vni Unexecuted instantiation: connected.c:label2vni Unexecuted instantiation: if_netlink.c:label2vni Unexecuted instantiation: interface.c:label2vni Unexecuted instantiation: ioctl.c:label2vni Unexecuted instantiation: kernel_netlink.c:label2vni Unexecuted instantiation: label_manager.c:label2vni Unexecuted instantiation: main.c:label2vni Unexecuted instantiation: netconf_netlink.c:label2vni Unexecuted instantiation: redistribute.c:label2vni Unexecuted instantiation: router-id.c:label2vni Unexecuted instantiation: rt_netlink.c:label2vni Unexecuted instantiation: rtadv.c:label2vni Unexecuted instantiation: rtread_netlink.c:label2vni Unexecuted instantiation: rule_netlink.c:label2vni Unexecuted instantiation: table_manager.c:label2vni Unexecuted instantiation: tc_netlink.c:label2vni Unexecuted instantiation: zapi_msg.c:label2vni Unexecuted instantiation: zebra_affinitymap.c:label2vni Unexecuted instantiation: zebra_dplane.c:label2vni Unexecuted instantiation: zebra_gr.c:label2vni Unexecuted instantiation: zebra_l2.c:label2vni Unexecuted instantiation: zebra_l2_bridge_if.c:label2vni Unexecuted instantiation: zebra_evpn.c:label2vni Unexecuted instantiation: zebra_evpn_mac.c:label2vni Unexecuted instantiation: zebra_evpn_neigh.c:label2vni Unexecuted instantiation: zebra_mlag.c:label2vni Unexecuted instantiation: zebra_mlag_vty.c:label2vni Unexecuted instantiation: zebra_mpls.c:label2vni Unexecuted instantiation: zebra_mpls_netlink.c:label2vni Unexecuted instantiation: zebra_mpls_null.c:label2vni Unexecuted instantiation: zebra_mpls_vty.c:label2vni Unexecuted instantiation: zebra_srv6.c:label2vni Unexecuted instantiation: zebra_srv6_vty.c:label2vni Unexecuted instantiation: zebra_mroute.c:label2vni Unexecuted instantiation: zebra_nb.c:label2vni Unexecuted instantiation: zebra_nb_config.c:label2vni Unexecuted instantiation: zebra_nb_rpcs.c:label2vni Unexecuted instantiation: zebra_nb_state.c:label2vni Unexecuted instantiation: zebra_netns_id.c:label2vni Unexecuted instantiation: zebra_netns_notify.c:label2vni Unexecuted instantiation: zebra_nhg.c:label2vni Unexecuted instantiation: zebra_ns.c:label2vni Unexecuted instantiation: zebra_opaque.c:label2vni Unexecuted instantiation: zebra_pbr.c:label2vni Unexecuted instantiation: zebra_ptm.c:label2vni Unexecuted instantiation: zebra_ptm_redistribute.c:label2vni Unexecuted instantiation: zebra_pw.c:label2vni Unexecuted instantiation: zebra_rib.c:label2vni Unexecuted instantiation: zebra_router.c:label2vni Unexecuted instantiation: zebra_rnh.c:label2vni Unexecuted instantiation: zebra_routemap.c:label2vni Unexecuted instantiation: zebra_routemap_nb_config.c:label2vni Unexecuted instantiation: zebra_script.c:label2vni Unexecuted instantiation: zebra_srte.c:label2vni Unexecuted instantiation: zebra_tc.c:label2vni Unexecuted instantiation: zebra_vrf.c:label2vni Unexecuted instantiation: zebra_vty.c:label2vni Unexecuted instantiation: zebra_vxlan.c:label2vni Unexecuted instantiation: zebra_vxlan_if.c:label2vni Unexecuted instantiation: zebra_evpn_mh.c:label2vni Unexecuted instantiation: zebra_neigh.c:label2vni Unexecuted instantiation: zserv.c:label2vni Unexecuted instantiation: debug_nl.c:label2vni Unexecuted instantiation: bgp_main.c:label2vni Unexecuted instantiation: bgp_attr.c:label2vni Unexecuted instantiation: bgp_attr_evpn.c:label2vni Unexecuted instantiation: bgp_clist.c:label2vni Unexecuted instantiation: bgp_community.c:label2vni Unexecuted instantiation: bgp_community_alias.c:label2vni Unexecuted instantiation: bgp_debug.c:label2vni Unexecuted instantiation: bgp_dump.c:label2vni Unexecuted instantiation: bgp_ecommunity.c:label2vni Unexecuted instantiation: bgp_evpn.c:label2vni Unexecuted instantiation: bgp_evpn_mh.c:label2vni Unexecuted instantiation: bgp_evpn_vty.c:label2vni Unexecuted instantiation: bgp_filter.c:label2vni Unexecuted instantiation: bgp_flowspec_vty.c:label2vni Unexecuted instantiation: bgp_fsm.c:label2vni Unexecuted instantiation: bgp_io.c:label2vni Unexecuted instantiation: bgp_keepalives.c:label2vni Unexecuted instantiation: bgp_labelpool.c:label2vni Unexecuted instantiation: bgp_lcommunity.c:label2vni Unexecuted instantiation: bgp_mac.c:label2vni Unexecuted instantiation: bgp_mpath.c:label2vni Unexecuted instantiation: bgp_mplsvpn.c:label2vni Unexecuted instantiation: bgp_network.c:label2vni Unexecuted instantiation: bgp_nexthop.c:label2vni Unexecuted instantiation: bgp_nht.c:label2vni Unexecuted instantiation: bgp_packet.c:label2vni Unexecuted instantiation: bgp_pbr.c:label2vni Unexecuted instantiation: bgp_rd.c:label2vni Unexecuted instantiation: bgp_regex.c:label2vni Unexecuted instantiation: bgp_route.c:label2vni Unexecuted instantiation: bgp_routemap.c:label2vni Unexecuted instantiation: bgp_routemap_nb.c:label2vni Unexecuted instantiation: bgp_routemap_nb_config.c:label2vni Unexecuted instantiation: bgp_table.c:label2vni Unexecuted instantiation: bgp_updgrp.c:label2vni Unexecuted instantiation: bgp_updgrp_adv.c:label2vni Unexecuted instantiation: bgp_updgrp_packet.c:label2vni Unexecuted instantiation: bgp_vpn.c:label2vni Unexecuted instantiation: bgp_vty.c:label2vni Unexecuted instantiation: bgp_zebra.c:label2vni Unexecuted instantiation: bgpd.c:label2vni Unexecuted instantiation: bgp_rfapi_cfg.c:label2vni Unexecuted instantiation: rfapi_import.c:label2vni Unexecuted instantiation: rfapi.c:label2vni Unexecuted instantiation: rfapi_ap.c:label2vni Unexecuted instantiation: rfapi_encap_tlv.c:label2vni Unexecuted instantiation: rfapi_nve_addr.c:label2vni Unexecuted instantiation: rfapi_monitor.c:label2vni Unexecuted instantiation: rfapi_rib.c:label2vni Unexecuted instantiation: rfapi_vty.c:label2vni Unexecuted instantiation: vnc_debug.c:label2vni Unexecuted instantiation: vnc_export_bgp.c:label2vni Unexecuted instantiation: vnc_export_table.c:label2vni Unexecuted instantiation: vnc_import_bgp.c:label2vni Unexecuted instantiation: vnc_zebra.c:label2vni Unexecuted instantiation: bgp_addpath.c:label2vni Unexecuted instantiation: bgp_advertise.c:label2vni Unexecuted instantiation: bgp_aspath.c:label2vni Unexecuted instantiation: bgp_bfd.c:label2vni Unexecuted instantiation: bgp_conditional_adv.c:label2vni Unexecuted instantiation: bgp_damp.c:label2vni Unexecuted instantiation: bgp_encap_tlv.c:label2vni Unexecuted instantiation: bgp_flowspec.c:label2vni Unexecuted instantiation: bgp_flowspec_util.c:label2vni Unexecuted instantiation: bgp_label.c:label2vni Unexecuted instantiation: bgp_open.c:label2vni Unexecuted instantiation: rfp_example.c:label2vni Unexecuted instantiation: pim_assert.c:label2vni Unexecuted instantiation: pim_bfd.c:label2vni Unexecuted instantiation: pim_bsm.c:label2vni Unexecuted instantiation: pim_cmd_common.c:label2vni Unexecuted instantiation: pim_hello.c:label2vni Unexecuted instantiation: pim_iface.c:label2vni Unexecuted instantiation: pim_ifchannel.c:label2vni Unexecuted instantiation: pim_instance.c:label2vni Unexecuted instantiation: pim_join.c:label2vni Unexecuted instantiation: pim_jp_agg.c:label2vni Unexecuted instantiation: pim_macro.c:label2vni Unexecuted instantiation: pim_mroute.c:label2vni Unexecuted instantiation: pim_msg.c:label2vni Unexecuted instantiation: pim_nb_config.c:label2vni Unexecuted instantiation: pim_neighbor.c:label2vni Unexecuted instantiation: pim_nht.c:label2vni Unexecuted instantiation: pim_oil.c:label2vni Unexecuted instantiation: pim_pim.c:label2vni Unexecuted instantiation: pim_routemap.c:label2vni Unexecuted instantiation: pim_rp.c:label2vni Unexecuted instantiation: pim_rpf.c:label2vni Unexecuted instantiation: pim_sock.c:label2vni Unexecuted instantiation: pim_ssm.c:label2vni Unexecuted instantiation: pim_ssmpingd.c:label2vni Unexecuted instantiation: pim_static.c:label2vni Unexecuted instantiation: pim_tib.c:label2vni Unexecuted instantiation: pim_tlv.c:label2vni Unexecuted instantiation: pim_upstream.c:label2vni Unexecuted instantiation: pim_util.c:label2vni Unexecuted instantiation: pim_vty.c:label2vni Unexecuted instantiation: pim_zebra.c:label2vni Unexecuted instantiation: pim_zlookup.c:label2vni Unexecuted instantiation: pim_vxlan.c:label2vni Unexecuted instantiation: pim_register.c:label2vni Unexecuted instantiation: pimd.c:label2vni Unexecuted instantiation: pim_cmd.c:label2vni Unexecuted instantiation: pim_igmp.c:label2vni Unexecuted instantiation: pim_igmp_mtrace.c:label2vni Unexecuted instantiation: pim_igmpv2.c:label2vni Unexecuted instantiation: pim_igmpv3.c:label2vni Unexecuted instantiation: pim_main.c:label2vni Unexecuted instantiation: pim_mlag.c:label2vni Unexecuted instantiation: pim_msdp.c:label2vni Unexecuted instantiation: pim_msdp_packet.c:label2vni Unexecuted instantiation: pim_msdp_socket.c:label2vni Unexecuted instantiation: pim_signals.c:label2vni Unexecuted instantiation: pim_zpthread.c:label2vni |
147 | | |
148 | | /* Encode a label stack entry from fields; convert to network byte-order as |
149 | | * the Netlink interface expects MPLS labels to be in this format. |
150 | | */ |
151 | | static inline mpls_lse_t mpls_lse_encode(mpls_label_t label, uint32_t ttl, |
152 | | uint32_t exp, uint32_t bos) |
153 | 0 | { |
154 | 0 | mpls_lse_t lse; |
155 | 0 | lse = htonl((label << MPLS_LS_LABEL_SHIFT) | (exp << MPLS_LS_EXP_SHIFT) |
156 | 0 | | (bos ? (1 << MPLS_LS_S_SHIFT) : 0) |
157 | 0 | | (ttl << MPLS_LS_TTL_SHIFT)); |
158 | 0 | return lse; |
159 | 0 | } Unexecuted instantiation: ospf_main.c:mpls_lse_encode Unexecuted instantiation: ospf_bfd.c:mpls_lse_encode Unexecuted instantiation: ospf_dump.c:mpls_lse_encode Unexecuted instantiation: ospf_dump_api.c:mpls_lse_encode Unexecuted instantiation: ospf_interface.c:mpls_lse_encode Unexecuted instantiation: ospf_lsa.c:mpls_lse_encode Unexecuted instantiation: ospf_lsdb.c:mpls_lse_encode Unexecuted instantiation: ospf_neighbor.c:mpls_lse_encode Unexecuted instantiation: ospf_network.c:mpls_lse_encode Unexecuted instantiation: ospf_nsm.c:mpls_lse_encode Unexecuted instantiation: ospf_opaque.c:mpls_lse_encode Unexecuted instantiation: ospf_packet.c:mpls_lse_encode Unexecuted instantiation: ospf_ri.c:mpls_lse_encode Unexecuted instantiation: ospf_routemap.c:mpls_lse_encode Unexecuted instantiation: ospf_routemap_nb.c:mpls_lse_encode Unexecuted instantiation: ospf_routemap_nb_config.c:mpls_lse_encode Unexecuted instantiation: ospf_spf.c:mpls_lse_encode Unexecuted instantiation: ospf_ti_lfa.c:mpls_lse_encode Unexecuted instantiation: ospf_sr.c:mpls_lse_encode Unexecuted instantiation: ospf_te.c:mpls_lse_encode Unexecuted instantiation: ospf_vty.c:mpls_lse_encode Unexecuted instantiation: ospf_zebra.c:mpls_lse_encode Unexecuted instantiation: ospfd.c:mpls_lse_encode Unexecuted instantiation: ospf_gr_helper.c:mpls_lse_encode Unexecuted instantiation: ospf_abr.c:mpls_lse_encode Unexecuted instantiation: ospf_apiserver.c:mpls_lse_encode Unexecuted instantiation: ospf_asbr.c:mpls_lse_encode Unexecuted instantiation: ospf_ase.c:mpls_lse_encode Unexecuted instantiation: ospf_ext.c:mpls_lse_encode Unexecuted instantiation: ospf_flood.c:mpls_lse_encode Unexecuted instantiation: ospf_gr.c:mpls_lse_encode Unexecuted instantiation: ospf_ia.c:mpls_lse_encode Unexecuted instantiation: ospf_ism.c:mpls_lse_encode Unexecuted instantiation: ospf_ldp_sync.c:mpls_lse_encode Unexecuted instantiation: ospf_route.c:mpls_lse_encode Unexecuted instantiation: ospf_api.c:mpls_lse_encode Unexecuted instantiation: affinitymap.c:mpls_lse_encode Unexecuted instantiation: affinitymap_cli.c:mpls_lse_encode Unexecuted instantiation: affinitymap_northbound.c:mpls_lse_encode Unexecuted instantiation: bfd.c:mpls_lse_encode Unexecuted instantiation: command.c:mpls_lse_encode Unexecuted instantiation: cspf.c:mpls_lse_encode Unexecuted instantiation: filter.c:mpls_lse_encode Unexecuted instantiation: filter_cli.c:mpls_lse_encode Unexecuted instantiation: filter_nb.c:mpls_lse_encode Unexecuted instantiation: ldp_sync.c:mpls_lse_encode Unexecuted instantiation: libfrr.c:mpls_lse_encode Unexecuted instantiation: link_state.c:mpls_lse_encode Unexecuted instantiation: log.c:mpls_lse_encode Unexecuted instantiation: mgmt_be_client.c:mpls_lse_encode Unexecuted instantiation: mgmt_fe_client.c:mpls_lse_encode Unexecuted instantiation: mgmt_msg.c:mpls_lse_encode Unexecuted instantiation: mlag.c:mpls_lse_encode Unexecuted instantiation: mpls.c:mpls_lse_encode Unexecuted instantiation: nexthop.c:mpls_lse_encode Unexecuted instantiation: nexthop_group.c:mpls_lse_encode Unexecuted instantiation: plist.c:mpls_lse_encode Unexecuted instantiation: pullwr.c:mpls_lse_encode Unexecuted instantiation: routemap.c:mpls_lse_encode Unexecuted instantiation: routemap_cli.c:mpls_lse_encode Unexecuted instantiation: routemap_northbound.c:mpls_lse_encode Unexecuted instantiation: stream.c:mpls_lse_encode Unexecuted instantiation: yang_wrappers.c:mpls_lse_encode Unexecuted instantiation: zclient.c:mpls_lse_encode Unexecuted instantiation: tc.c:mpls_lse_encode Unexecuted instantiation: connected.c:mpls_lse_encode Unexecuted instantiation: if_netlink.c:mpls_lse_encode Unexecuted instantiation: interface.c:mpls_lse_encode Unexecuted instantiation: ioctl.c:mpls_lse_encode Unexecuted instantiation: kernel_netlink.c:mpls_lse_encode Unexecuted instantiation: label_manager.c:mpls_lse_encode Unexecuted instantiation: main.c:mpls_lse_encode Unexecuted instantiation: netconf_netlink.c:mpls_lse_encode Unexecuted instantiation: redistribute.c:mpls_lse_encode Unexecuted instantiation: router-id.c:mpls_lse_encode Unexecuted instantiation: rt_netlink.c:mpls_lse_encode Unexecuted instantiation: rtadv.c:mpls_lse_encode Unexecuted instantiation: rtread_netlink.c:mpls_lse_encode Unexecuted instantiation: rule_netlink.c:mpls_lse_encode Unexecuted instantiation: table_manager.c:mpls_lse_encode Unexecuted instantiation: tc_netlink.c:mpls_lse_encode Unexecuted instantiation: zapi_msg.c:mpls_lse_encode Unexecuted instantiation: zebra_affinitymap.c:mpls_lse_encode Unexecuted instantiation: zebra_dplane.c:mpls_lse_encode Unexecuted instantiation: zebra_gr.c:mpls_lse_encode Unexecuted instantiation: zebra_l2.c:mpls_lse_encode Unexecuted instantiation: zebra_l2_bridge_if.c:mpls_lse_encode Unexecuted instantiation: zebra_evpn.c:mpls_lse_encode Unexecuted instantiation: zebra_evpn_mac.c:mpls_lse_encode Unexecuted instantiation: zebra_evpn_neigh.c:mpls_lse_encode Unexecuted instantiation: zebra_mlag.c:mpls_lse_encode Unexecuted instantiation: zebra_mlag_vty.c:mpls_lse_encode Unexecuted instantiation: zebra_mpls.c:mpls_lse_encode Unexecuted instantiation: zebra_mpls_netlink.c:mpls_lse_encode Unexecuted instantiation: zebra_mpls_null.c:mpls_lse_encode Unexecuted instantiation: zebra_mpls_vty.c:mpls_lse_encode Unexecuted instantiation: zebra_srv6.c:mpls_lse_encode Unexecuted instantiation: zebra_srv6_vty.c:mpls_lse_encode Unexecuted instantiation: zebra_mroute.c:mpls_lse_encode Unexecuted instantiation: zebra_nb.c:mpls_lse_encode Unexecuted instantiation: zebra_nb_config.c:mpls_lse_encode Unexecuted instantiation: zebra_nb_rpcs.c:mpls_lse_encode Unexecuted instantiation: zebra_nb_state.c:mpls_lse_encode Unexecuted instantiation: zebra_netns_id.c:mpls_lse_encode Unexecuted instantiation: zebra_netns_notify.c:mpls_lse_encode Unexecuted instantiation: zebra_nhg.c:mpls_lse_encode Unexecuted instantiation: zebra_ns.c:mpls_lse_encode Unexecuted instantiation: zebra_opaque.c:mpls_lse_encode Unexecuted instantiation: zebra_pbr.c:mpls_lse_encode Unexecuted instantiation: zebra_ptm.c:mpls_lse_encode Unexecuted instantiation: zebra_ptm_redistribute.c:mpls_lse_encode Unexecuted instantiation: zebra_pw.c:mpls_lse_encode Unexecuted instantiation: zebra_rib.c:mpls_lse_encode Unexecuted instantiation: zebra_router.c:mpls_lse_encode Unexecuted instantiation: zebra_rnh.c:mpls_lse_encode Unexecuted instantiation: zebra_routemap.c:mpls_lse_encode Unexecuted instantiation: zebra_routemap_nb_config.c:mpls_lse_encode Unexecuted instantiation: zebra_script.c:mpls_lse_encode Unexecuted instantiation: zebra_srte.c:mpls_lse_encode Unexecuted instantiation: zebra_tc.c:mpls_lse_encode Unexecuted instantiation: zebra_vrf.c:mpls_lse_encode Unexecuted instantiation: zebra_vty.c:mpls_lse_encode Unexecuted instantiation: zebra_vxlan.c:mpls_lse_encode Unexecuted instantiation: zebra_vxlan_if.c:mpls_lse_encode Unexecuted instantiation: zebra_evpn_mh.c:mpls_lse_encode Unexecuted instantiation: zebra_neigh.c:mpls_lse_encode Unexecuted instantiation: zserv.c:mpls_lse_encode Unexecuted instantiation: debug_nl.c:mpls_lse_encode Unexecuted instantiation: bgp_main.c:mpls_lse_encode Unexecuted instantiation: bgp_attr.c:mpls_lse_encode Unexecuted instantiation: bgp_attr_evpn.c:mpls_lse_encode Unexecuted instantiation: bgp_clist.c:mpls_lse_encode Unexecuted instantiation: bgp_community.c:mpls_lse_encode Unexecuted instantiation: bgp_community_alias.c:mpls_lse_encode Unexecuted instantiation: bgp_debug.c:mpls_lse_encode Unexecuted instantiation: bgp_dump.c:mpls_lse_encode Unexecuted instantiation: bgp_ecommunity.c:mpls_lse_encode Unexecuted instantiation: bgp_evpn.c:mpls_lse_encode Unexecuted instantiation: bgp_evpn_mh.c:mpls_lse_encode Unexecuted instantiation: bgp_evpn_vty.c:mpls_lse_encode Unexecuted instantiation: bgp_filter.c:mpls_lse_encode Unexecuted instantiation: bgp_flowspec_vty.c:mpls_lse_encode Unexecuted instantiation: bgp_fsm.c:mpls_lse_encode Unexecuted instantiation: bgp_io.c:mpls_lse_encode Unexecuted instantiation: bgp_keepalives.c:mpls_lse_encode Unexecuted instantiation: bgp_labelpool.c:mpls_lse_encode Unexecuted instantiation: bgp_lcommunity.c:mpls_lse_encode Unexecuted instantiation: bgp_mac.c:mpls_lse_encode Unexecuted instantiation: bgp_mpath.c:mpls_lse_encode Unexecuted instantiation: bgp_mplsvpn.c:mpls_lse_encode Unexecuted instantiation: bgp_network.c:mpls_lse_encode Unexecuted instantiation: bgp_nexthop.c:mpls_lse_encode Unexecuted instantiation: bgp_nht.c:mpls_lse_encode Unexecuted instantiation: bgp_packet.c:mpls_lse_encode Unexecuted instantiation: bgp_pbr.c:mpls_lse_encode Unexecuted instantiation: bgp_rd.c:mpls_lse_encode Unexecuted instantiation: bgp_regex.c:mpls_lse_encode Unexecuted instantiation: bgp_route.c:mpls_lse_encode Unexecuted instantiation: bgp_routemap.c:mpls_lse_encode Unexecuted instantiation: bgp_routemap_nb.c:mpls_lse_encode Unexecuted instantiation: bgp_routemap_nb_config.c:mpls_lse_encode Unexecuted instantiation: bgp_table.c:mpls_lse_encode Unexecuted instantiation: bgp_updgrp.c:mpls_lse_encode Unexecuted instantiation: bgp_updgrp_adv.c:mpls_lse_encode Unexecuted instantiation: bgp_updgrp_packet.c:mpls_lse_encode Unexecuted instantiation: bgp_vpn.c:mpls_lse_encode Unexecuted instantiation: bgp_vty.c:mpls_lse_encode Unexecuted instantiation: bgp_zebra.c:mpls_lse_encode Unexecuted instantiation: bgpd.c:mpls_lse_encode Unexecuted instantiation: bgp_rfapi_cfg.c:mpls_lse_encode Unexecuted instantiation: rfapi_import.c:mpls_lse_encode Unexecuted instantiation: rfapi.c:mpls_lse_encode Unexecuted instantiation: rfapi_ap.c:mpls_lse_encode Unexecuted instantiation: rfapi_encap_tlv.c:mpls_lse_encode Unexecuted instantiation: rfapi_nve_addr.c:mpls_lse_encode Unexecuted instantiation: rfapi_monitor.c:mpls_lse_encode Unexecuted instantiation: rfapi_rib.c:mpls_lse_encode Unexecuted instantiation: rfapi_vty.c:mpls_lse_encode Unexecuted instantiation: vnc_debug.c:mpls_lse_encode Unexecuted instantiation: vnc_export_bgp.c:mpls_lse_encode Unexecuted instantiation: vnc_export_table.c:mpls_lse_encode Unexecuted instantiation: vnc_import_bgp.c:mpls_lse_encode Unexecuted instantiation: vnc_zebra.c:mpls_lse_encode Unexecuted instantiation: bgp_addpath.c:mpls_lse_encode Unexecuted instantiation: bgp_advertise.c:mpls_lse_encode Unexecuted instantiation: bgp_aspath.c:mpls_lse_encode Unexecuted instantiation: bgp_bfd.c:mpls_lse_encode Unexecuted instantiation: bgp_conditional_adv.c:mpls_lse_encode Unexecuted instantiation: bgp_damp.c:mpls_lse_encode Unexecuted instantiation: bgp_encap_tlv.c:mpls_lse_encode Unexecuted instantiation: bgp_flowspec.c:mpls_lse_encode Unexecuted instantiation: bgp_flowspec_util.c:mpls_lse_encode Unexecuted instantiation: bgp_label.c:mpls_lse_encode Unexecuted instantiation: bgp_open.c:mpls_lse_encode Unexecuted instantiation: rfp_example.c:mpls_lse_encode Unexecuted instantiation: pim_assert.c:mpls_lse_encode Unexecuted instantiation: pim_bfd.c:mpls_lse_encode Unexecuted instantiation: pim_bsm.c:mpls_lse_encode Unexecuted instantiation: pim_cmd_common.c:mpls_lse_encode Unexecuted instantiation: pim_hello.c:mpls_lse_encode Unexecuted instantiation: pim_iface.c:mpls_lse_encode Unexecuted instantiation: pim_ifchannel.c:mpls_lse_encode Unexecuted instantiation: pim_instance.c:mpls_lse_encode Unexecuted instantiation: pim_join.c:mpls_lse_encode Unexecuted instantiation: pim_jp_agg.c:mpls_lse_encode Unexecuted instantiation: pim_macro.c:mpls_lse_encode Unexecuted instantiation: pim_mroute.c:mpls_lse_encode Unexecuted instantiation: pim_msg.c:mpls_lse_encode Unexecuted instantiation: pim_nb_config.c:mpls_lse_encode Unexecuted instantiation: pim_neighbor.c:mpls_lse_encode Unexecuted instantiation: pim_nht.c:mpls_lse_encode Unexecuted instantiation: pim_oil.c:mpls_lse_encode Unexecuted instantiation: pim_pim.c:mpls_lse_encode Unexecuted instantiation: pim_routemap.c:mpls_lse_encode Unexecuted instantiation: pim_rp.c:mpls_lse_encode Unexecuted instantiation: pim_rpf.c:mpls_lse_encode Unexecuted instantiation: pim_sock.c:mpls_lse_encode Unexecuted instantiation: pim_ssm.c:mpls_lse_encode Unexecuted instantiation: pim_ssmpingd.c:mpls_lse_encode Unexecuted instantiation: pim_static.c:mpls_lse_encode Unexecuted instantiation: pim_tib.c:mpls_lse_encode Unexecuted instantiation: pim_tlv.c:mpls_lse_encode Unexecuted instantiation: pim_upstream.c:mpls_lse_encode Unexecuted instantiation: pim_util.c:mpls_lse_encode Unexecuted instantiation: pim_vty.c:mpls_lse_encode Unexecuted instantiation: pim_zebra.c:mpls_lse_encode Unexecuted instantiation: pim_zlookup.c:mpls_lse_encode Unexecuted instantiation: pim_vxlan.c:mpls_lse_encode Unexecuted instantiation: pim_register.c:mpls_lse_encode Unexecuted instantiation: pimd.c:mpls_lse_encode Unexecuted instantiation: pim_cmd.c:mpls_lse_encode Unexecuted instantiation: pim_igmp.c:mpls_lse_encode Unexecuted instantiation: pim_igmp_mtrace.c:mpls_lse_encode Unexecuted instantiation: pim_igmpv2.c:mpls_lse_encode Unexecuted instantiation: pim_igmpv3.c:mpls_lse_encode Unexecuted instantiation: pim_main.c:mpls_lse_encode Unexecuted instantiation: pim_mlag.c:mpls_lse_encode Unexecuted instantiation: pim_msdp.c:mpls_lse_encode Unexecuted instantiation: pim_msdp_packet.c:mpls_lse_encode Unexecuted instantiation: pim_msdp_socket.c:mpls_lse_encode Unexecuted instantiation: pim_signals.c:mpls_lse_encode Unexecuted instantiation: pim_zpthread.c:mpls_lse_encode |
160 | | |
161 | | /* Extract the fields from a label stack entry after converting to host-byte |
162 | | * order. This is expected to be called only for messages received over the |
163 | | * Netlink interface. |
164 | | */ |
165 | | static inline void mpls_lse_decode(mpls_lse_t lse, mpls_label_t *label, |
166 | | uint32_t *ttl, uint32_t *exp, uint32_t *bos) |
167 | 0 | { |
168 | 0 | mpls_lse_t local_lse; |
169 | |
|
170 | 0 | local_lse = ntohl(lse); |
171 | 0 | *label = MPLS_LABEL_VALUE(local_lse); |
172 | 0 | *exp = MPLS_LABEL_EXP(local_lse); |
173 | 0 | *bos = MPLS_LABEL_BOS(local_lse); |
174 | 0 | *ttl = MPLS_LABEL_TTL(local_lse); |
175 | 0 | } Unexecuted instantiation: ospf_main.c:mpls_lse_decode Unexecuted instantiation: ospf_bfd.c:mpls_lse_decode Unexecuted instantiation: ospf_dump.c:mpls_lse_decode Unexecuted instantiation: ospf_dump_api.c:mpls_lse_decode Unexecuted instantiation: ospf_interface.c:mpls_lse_decode Unexecuted instantiation: ospf_lsa.c:mpls_lse_decode Unexecuted instantiation: ospf_lsdb.c:mpls_lse_decode Unexecuted instantiation: ospf_neighbor.c:mpls_lse_decode Unexecuted instantiation: ospf_network.c:mpls_lse_decode Unexecuted instantiation: ospf_nsm.c:mpls_lse_decode Unexecuted instantiation: ospf_opaque.c:mpls_lse_decode Unexecuted instantiation: ospf_packet.c:mpls_lse_decode Unexecuted instantiation: ospf_ri.c:mpls_lse_decode Unexecuted instantiation: ospf_routemap.c:mpls_lse_decode Unexecuted instantiation: ospf_routemap_nb.c:mpls_lse_decode Unexecuted instantiation: ospf_routemap_nb_config.c:mpls_lse_decode Unexecuted instantiation: ospf_spf.c:mpls_lse_decode Unexecuted instantiation: ospf_ti_lfa.c:mpls_lse_decode Unexecuted instantiation: ospf_sr.c:mpls_lse_decode Unexecuted instantiation: ospf_te.c:mpls_lse_decode Unexecuted instantiation: ospf_vty.c:mpls_lse_decode Unexecuted instantiation: ospf_zebra.c:mpls_lse_decode Unexecuted instantiation: ospfd.c:mpls_lse_decode Unexecuted instantiation: ospf_gr_helper.c:mpls_lse_decode Unexecuted instantiation: ospf_abr.c:mpls_lse_decode Unexecuted instantiation: ospf_apiserver.c:mpls_lse_decode Unexecuted instantiation: ospf_asbr.c:mpls_lse_decode Unexecuted instantiation: ospf_ase.c:mpls_lse_decode Unexecuted instantiation: ospf_ext.c:mpls_lse_decode Unexecuted instantiation: ospf_flood.c:mpls_lse_decode Unexecuted instantiation: ospf_gr.c:mpls_lse_decode Unexecuted instantiation: ospf_ia.c:mpls_lse_decode Unexecuted instantiation: ospf_ism.c:mpls_lse_decode Unexecuted instantiation: ospf_ldp_sync.c:mpls_lse_decode Unexecuted instantiation: ospf_route.c:mpls_lse_decode Unexecuted instantiation: ospf_api.c:mpls_lse_decode Unexecuted instantiation: affinitymap.c:mpls_lse_decode Unexecuted instantiation: affinitymap_cli.c:mpls_lse_decode Unexecuted instantiation: affinitymap_northbound.c:mpls_lse_decode Unexecuted instantiation: bfd.c:mpls_lse_decode Unexecuted instantiation: command.c:mpls_lse_decode Unexecuted instantiation: cspf.c:mpls_lse_decode Unexecuted instantiation: filter.c:mpls_lse_decode Unexecuted instantiation: filter_cli.c:mpls_lse_decode Unexecuted instantiation: filter_nb.c:mpls_lse_decode Unexecuted instantiation: ldp_sync.c:mpls_lse_decode Unexecuted instantiation: libfrr.c:mpls_lse_decode Unexecuted instantiation: link_state.c:mpls_lse_decode Unexecuted instantiation: log.c:mpls_lse_decode Unexecuted instantiation: mgmt_be_client.c:mpls_lse_decode Unexecuted instantiation: mgmt_fe_client.c:mpls_lse_decode Unexecuted instantiation: mgmt_msg.c:mpls_lse_decode Unexecuted instantiation: mlag.c:mpls_lse_decode Unexecuted instantiation: mpls.c:mpls_lse_decode Unexecuted instantiation: nexthop.c:mpls_lse_decode Unexecuted instantiation: nexthop_group.c:mpls_lse_decode Unexecuted instantiation: plist.c:mpls_lse_decode Unexecuted instantiation: pullwr.c:mpls_lse_decode Unexecuted instantiation: routemap.c:mpls_lse_decode Unexecuted instantiation: routemap_cli.c:mpls_lse_decode Unexecuted instantiation: routemap_northbound.c:mpls_lse_decode Unexecuted instantiation: stream.c:mpls_lse_decode Unexecuted instantiation: yang_wrappers.c:mpls_lse_decode Unexecuted instantiation: zclient.c:mpls_lse_decode Unexecuted instantiation: tc.c:mpls_lse_decode Unexecuted instantiation: connected.c:mpls_lse_decode Unexecuted instantiation: if_netlink.c:mpls_lse_decode Unexecuted instantiation: interface.c:mpls_lse_decode Unexecuted instantiation: ioctl.c:mpls_lse_decode Unexecuted instantiation: kernel_netlink.c:mpls_lse_decode Unexecuted instantiation: label_manager.c:mpls_lse_decode Unexecuted instantiation: main.c:mpls_lse_decode Unexecuted instantiation: netconf_netlink.c:mpls_lse_decode Unexecuted instantiation: redistribute.c:mpls_lse_decode Unexecuted instantiation: router-id.c:mpls_lse_decode Unexecuted instantiation: rt_netlink.c:mpls_lse_decode Unexecuted instantiation: rtadv.c:mpls_lse_decode Unexecuted instantiation: rtread_netlink.c:mpls_lse_decode Unexecuted instantiation: rule_netlink.c:mpls_lse_decode Unexecuted instantiation: table_manager.c:mpls_lse_decode Unexecuted instantiation: tc_netlink.c:mpls_lse_decode Unexecuted instantiation: zapi_msg.c:mpls_lse_decode Unexecuted instantiation: zebra_affinitymap.c:mpls_lse_decode Unexecuted instantiation: zebra_dplane.c:mpls_lse_decode Unexecuted instantiation: zebra_gr.c:mpls_lse_decode Unexecuted instantiation: zebra_l2.c:mpls_lse_decode Unexecuted instantiation: zebra_l2_bridge_if.c:mpls_lse_decode Unexecuted instantiation: zebra_evpn.c:mpls_lse_decode Unexecuted instantiation: zebra_evpn_mac.c:mpls_lse_decode Unexecuted instantiation: zebra_evpn_neigh.c:mpls_lse_decode Unexecuted instantiation: zebra_mlag.c:mpls_lse_decode Unexecuted instantiation: zebra_mlag_vty.c:mpls_lse_decode Unexecuted instantiation: zebra_mpls.c:mpls_lse_decode Unexecuted instantiation: zebra_mpls_netlink.c:mpls_lse_decode Unexecuted instantiation: zebra_mpls_null.c:mpls_lse_decode Unexecuted instantiation: zebra_mpls_vty.c:mpls_lse_decode Unexecuted instantiation: zebra_srv6.c:mpls_lse_decode Unexecuted instantiation: zebra_srv6_vty.c:mpls_lse_decode Unexecuted instantiation: zebra_mroute.c:mpls_lse_decode Unexecuted instantiation: zebra_nb.c:mpls_lse_decode Unexecuted instantiation: zebra_nb_config.c:mpls_lse_decode Unexecuted instantiation: zebra_nb_rpcs.c:mpls_lse_decode Unexecuted instantiation: zebra_nb_state.c:mpls_lse_decode Unexecuted instantiation: zebra_netns_id.c:mpls_lse_decode Unexecuted instantiation: zebra_netns_notify.c:mpls_lse_decode Unexecuted instantiation: zebra_nhg.c:mpls_lse_decode Unexecuted instantiation: zebra_ns.c:mpls_lse_decode Unexecuted instantiation: zebra_opaque.c:mpls_lse_decode Unexecuted instantiation: zebra_pbr.c:mpls_lse_decode Unexecuted instantiation: zebra_ptm.c:mpls_lse_decode Unexecuted instantiation: zebra_ptm_redistribute.c:mpls_lse_decode Unexecuted instantiation: zebra_pw.c:mpls_lse_decode Unexecuted instantiation: zebra_rib.c:mpls_lse_decode Unexecuted instantiation: zebra_router.c:mpls_lse_decode Unexecuted instantiation: zebra_rnh.c:mpls_lse_decode Unexecuted instantiation: zebra_routemap.c:mpls_lse_decode Unexecuted instantiation: zebra_routemap_nb_config.c:mpls_lse_decode Unexecuted instantiation: zebra_script.c:mpls_lse_decode Unexecuted instantiation: zebra_srte.c:mpls_lse_decode Unexecuted instantiation: zebra_tc.c:mpls_lse_decode Unexecuted instantiation: zebra_vrf.c:mpls_lse_decode Unexecuted instantiation: zebra_vty.c:mpls_lse_decode Unexecuted instantiation: zebra_vxlan.c:mpls_lse_decode Unexecuted instantiation: zebra_vxlan_if.c:mpls_lse_decode Unexecuted instantiation: zebra_evpn_mh.c:mpls_lse_decode Unexecuted instantiation: zebra_neigh.c:mpls_lse_decode Unexecuted instantiation: zserv.c:mpls_lse_decode Unexecuted instantiation: debug_nl.c:mpls_lse_decode Unexecuted instantiation: bgp_main.c:mpls_lse_decode Unexecuted instantiation: bgp_attr.c:mpls_lse_decode Unexecuted instantiation: bgp_attr_evpn.c:mpls_lse_decode Unexecuted instantiation: bgp_clist.c:mpls_lse_decode Unexecuted instantiation: bgp_community.c:mpls_lse_decode Unexecuted instantiation: bgp_community_alias.c:mpls_lse_decode Unexecuted instantiation: bgp_debug.c:mpls_lse_decode Unexecuted instantiation: bgp_dump.c:mpls_lse_decode Unexecuted instantiation: bgp_ecommunity.c:mpls_lse_decode Unexecuted instantiation: bgp_evpn.c:mpls_lse_decode Unexecuted instantiation: bgp_evpn_mh.c:mpls_lse_decode Unexecuted instantiation: bgp_evpn_vty.c:mpls_lse_decode Unexecuted instantiation: bgp_filter.c:mpls_lse_decode Unexecuted instantiation: bgp_flowspec_vty.c:mpls_lse_decode Unexecuted instantiation: bgp_fsm.c:mpls_lse_decode Unexecuted instantiation: bgp_io.c:mpls_lse_decode Unexecuted instantiation: bgp_keepalives.c:mpls_lse_decode Unexecuted instantiation: bgp_labelpool.c:mpls_lse_decode Unexecuted instantiation: bgp_lcommunity.c:mpls_lse_decode Unexecuted instantiation: bgp_mac.c:mpls_lse_decode Unexecuted instantiation: bgp_mpath.c:mpls_lse_decode Unexecuted instantiation: bgp_mplsvpn.c:mpls_lse_decode Unexecuted instantiation: bgp_network.c:mpls_lse_decode Unexecuted instantiation: bgp_nexthop.c:mpls_lse_decode Unexecuted instantiation: bgp_nht.c:mpls_lse_decode Unexecuted instantiation: bgp_packet.c:mpls_lse_decode Unexecuted instantiation: bgp_pbr.c:mpls_lse_decode Unexecuted instantiation: bgp_rd.c:mpls_lse_decode Unexecuted instantiation: bgp_regex.c:mpls_lse_decode Unexecuted instantiation: bgp_route.c:mpls_lse_decode Unexecuted instantiation: bgp_routemap.c:mpls_lse_decode Unexecuted instantiation: bgp_routemap_nb.c:mpls_lse_decode Unexecuted instantiation: bgp_routemap_nb_config.c:mpls_lse_decode Unexecuted instantiation: bgp_table.c:mpls_lse_decode Unexecuted instantiation: bgp_updgrp.c:mpls_lse_decode Unexecuted instantiation: bgp_updgrp_adv.c:mpls_lse_decode Unexecuted instantiation: bgp_updgrp_packet.c:mpls_lse_decode Unexecuted instantiation: bgp_vpn.c:mpls_lse_decode Unexecuted instantiation: bgp_vty.c:mpls_lse_decode Unexecuted instantiation: bgp_zebra.c:mpls_lse_decode Unexecuted instantiation: bgpd.c:mpls_lse_decode Unexecuted instantiation: bgp_rfapi_cfg.c:mpls_lse_decode Unexecuted instantiation: rfapi_import.c:mpls_lse_decode Unexecuted instantiation: rfapi.c:mpls_lse_decode Unexecuted instantiation: rfapi_ap.c:mpls_lse_decode Unexecuted instantiation: rfapi_encap_tlv.c:mpls_lse_decode Unexecuted instantiation: rfapi_nve_addr.c:mpls_lse_decode Unexecuted instantiation: rfapi_monitor.c:mpls_lse_decode Unexecuted instantiation: rfapi_rib.c:mpls_lse_decode Unexecuted instantiation: rfapi_vty.c:mpls_lse_decode Unexecuted instantiation: vnc_debug.c:mpls_lse_decode Unexecuted instantiation: vnc_export_bgp.c:mpls_lse_decode Unexecuted instantiation: vnc_export_table.c:mpls_lse_decode Unexecuted instantiation: vnc_import_bgp.c:mpls_lse_decode Unexecuted instantiation: vnc_zebra.c:mpls_lse_decode Unexecuted instantiation: bgp_addpath.c:mpls_lse_decode Unexecuted instantiation: bgp_advertise.c:mpls_lse_decode Unexecuted instantiation: bgp_aspath.c:mpls_lse_decode Unexecuted instantiation: bgp_bfd.c:mpls_lse_decode Unexecuted instantiation: bgp_conditional_adv.c:mpls_lse_decode Unexecuted instantiation: bgp_damp.c:mpls_lse_decode Unexecuted instantiation: bgp_encap_tlv.c:mpls_lse_decode Unexecuted instantiation: bgp_flowspec.c:mpls_lse_decode Unexecuted instantiation: bgp_flowspec_util.c:mpls_lse_decode Unexecuted instantiation: bgp_label.c:mpls_lse_decode Unexecuted instantiation: bgp_open.c:mpls_lse_decode Unexecuted instantiation: rfp_example.c:mpls_lse_decode Unexecuted instantiation: pim_assert.c:mpls_lse_decode Unexecuted instantiation: pim_bfd.c:mpls_lse_decode Unexecuted instantiation: pim_bsm.c:mpls_lse_decode Unexecuted instantiation: pim_cmd_common.c:mpls_lse_decode Unexecuted instantiation: pim_hello.c:mpls_lse_decode Unexecuted instantiation: pim_iface.c:mpls_lse_decode Unexecuted instantiation: pim_ifchannel.c:mpls_lse_decode Unexecuted instantiation: pim_instance.c:mpls_lse_decode Unexecuted instantiation: pim_join.c:mpls_lse_decode Unexecuted instantiation: pim_jp_agg.c:mpls_lse_decode Unexecuted instantiation: pim_macro.c:mpls_lse_decode Unexecuted instantiation: pim_mroute.c:mpls_lse_decode Unexecuted instantiation: pim_msg.c:mpls_lse_decode Unexecuted instantiation: pim_nb_config.c:mpls_lse_decode Unexecuted instantiation: pim_neighbor.c:mpls_lse_decode Unexecuted instantiation: pim_nht.c:mpls_lse_decode Unexecuted instantiation: pim_oil.c:mpls_lse_decode Unexecuted instantiation: pim_pim.c:mpls_lse_decode Unexecuted instantiation: pim_routemap.c:mpls_lse_decode Unexecuted instantiation: pim_rp.c:mpls_lse_decode Unexecuted instantiation: pim_rpf.c:mpls_lse_decode Unexecuted instantiation: pim_sock.c:mpls_lse_decode Unexecuted instantiation: pim_ssm.c:mpls_lse_decode Unexecuted instantiation: pim_ssmpingd.c:mpls_lse_decode Unexecuted instantiation: pim_static.c:mpls_lse_decode Unexecuted instantiation: pim_tib.c:mpls_lse_decode Unexecuted instantiation: pim_tlv.c:mpls_lse_decode Unexecuted instantiation: pim_upstream.c:mpls_lse_decode Unexecuted instantiation: pim_util.c:mpls_lse_decode Unexecuted instantiation: pim_vty.c:mpls_lse_decode Unexecuted instantiation: pim_zebra.c:mpls_lse_decode Unexecuted instantiation: pim_zlookup.c:mpls_lse_decode Unexecuted instantiation: pim_vxlan.c:mpls_lse_decode Unexecuted instantiation: pim_register.c:mpls_lse_decode Unexecuted instantiation: pimd.c:mpls_lse_decode Unexecuted instantiation: pim_cmd.c:mpls_lse_decode Unexecuted instantiation: pim_igmp.c:mpls_lse_decode Unexecuted instantiation: pim_igmp_mtrace.c:mpls_lse_decode Unexecuted instantiation: pim_igmpv2.c:mpls_lse_decode Unexecuted instantiation: pim_igmpv3.c:mpls_lse_decode Unexecuted instantiation: pim_main.c:mpls_lse_decode Unexecuted instantiation: pim_mlag.c:mpls_lse_decode Unexecuted instantiation: pim_msdp.c:mpls_lse_decode Unexecuted instantiation: pim_msdp_packet.c:mpls_lse_decode Unexecuted instantiation: pim_msdp_socket.c:mpls_lse_decode Unexecuted instantiation: pim_signals.c:mpls_lse_decode Unexecuted instantiation: pim_zpthread.c:mpls_lse_decode |
176 | | |
177 | | /* Invalid label index value (when used with BGP Prefix-SID). Should |
178 | | * match the BGP definition. |
179 | | */ |
180 | 2.78k | #define MPLS_INVALID_LABEL_INDEX 0xFFFFFFFF |
181 | | |
182 | | /* Printable string for labels (with consideration for reserved values). */ |
183 | | static inline char *label2str(mpls_label_t label, enum lsp_types_t type, |
184 | | char *buf, size_t len) |
185 | 0 | { |
186 | 0 | if (type == ZEBRA_LSP_EVPN) { |
187 | 0 | snprintf(buf, len, "%u", label2vni(&label)); |
188 | 0 | return (buf); |
189 | 0 | } |
190 | | |
191 | 0 | switch (label) { |
192 | 0 | case MPLS_LABEL_IPV4_EXPLICIT_NULL: |
193 | 0 | strlcpy(buf, "IPv4 Explicit Null", len); |
194 | 0 | return (buf); |
195 | 0 | case MPLS_LABEL_ROUTER_ALERT: |
196 | 0 | strlcpy(buf, "Router Alert", len); |
197 | 0 | return (buf); |
198 | 0 | case MPLS_LABEL_IPV6_EXPLICIT_NULL: |
199 | 0 | strlcpy(buf, "IPv6 Explicit Null", len); |
200 | 0 | return (buf); |
201 | 0 | case MPLS_LABEL_IMPLICIT_NULL: |
202 | 0 | strlcpy(buf, "implicit-null", len); |
203 | 0 | return (buf); |
204 | 0 | case MPLS_LABEL_ELI: |
205 | 0 | strlcpy(buf, "Entropy Label Indicator", len); |
206 | 0 | return (buf); |
207 | 0 | case MPLS_LABEL_GAL: |
208 | 0 | strlcpy(buf, "Generic Associated Channel", len); |
209 | 0 | return (buf); |
210 | 0 | case MPLS_LABEL_OAM_ALERT: |
211 | 0 | strlcpy(buf, "OAM Alert", len); |
212 | 0 | return (buf); |
213 | 0 | case MPLS_LABEL_EXTENSION: |
214 | 0 | strlcpy(buf, "Extension", len); |
215 | 0 | return (buf); |
216 | 0 | default: |
217 | 0 | if (label < 16) |
218 | 0 | snprintf(buf, len, "Reserved (%u)", label); |
219 | 0 | else |
220 | 0 | snprintf(buf, len, "%u", label); |
221 | 0 | return buf; |
222 | 0 | } |
223 | 0 | } Unexecuted instantiation: ospf_main.c:label2str Unexecuted instantiation: ospf_bfd.c:label2str Unexecuted instantiation: ospf_dump.c:label2str Unexecuted instantiation: ospf_dump_api.c:label2str Unexecuted instantiation: ospf_interface.c:label2str Unexecuted instantiation: ospf_lsa.c:label2str Unexecuted instantiation: ospf_lsdb.c:label2str Unexecuted instantiation: ospf_neighbor.c:label2str Unexecuted instantiation: ospf_network.c:label2str Unexecuted instantiation: ospf_nsm.c:label2str Unexecuted instantiation: ospf_opaque.c:label2str Unexecuted instantiation: ospf_packet.c:label2str Unexecuted instantiation: ospf_ri.c:label2str Unexecuted instantiation: ospf_routemap.c:label2str Unexecuted instantiation: ospf_routemap_nb.c:label2str Unexecuted instantiation: ospf_routemap_nb_config.c:label2str Unexecuted instantiation: ospf_spf.c:label2str Unexecuted instantiation: ospf_ti_lfa.c:label2str Unexecuted instantiation: ospf_sr.c:label2str Unexecuted instantiation: ospf_te.c:label2str Unexecuted instantiation: ospf_vty.c:label2str Unexecuted instantiation: ospf_zebra.c:label2str Unexecuted instantiation: ospfd.c:label2str Unexecuted instantiation: ospf_gr_helper.c:label2str Unexecuted instantiation: ospf_abr.c:label2str Unexecuted instantiation: ospf_apiserver.c:label2str Unexecuted instantiation: ospf_asbr.c:label2str Unexecuted instantiation: ospf_ase.c:label2str Unexecuted instantiation: ospf_ext.c:label2str Unexecuted instantiation: ospf_flood.c:label2str Unexecuted instantiation: ospf_gr.c:label2str Unexecuted instantiation: ospf_ia.c:label2str Unexecuted instantiation: ospf_ism.c:label2str Unexecuted instantiation: ospf_ldp_sync.c:label2str Unexecuted instantiation: ospf_route.c:label2str Unexecuted instantiation: ospf_api.c:label2str Unexecuted instantiation: affinitymap.c:label2str Unexecuted instantiation: affinitymap_cli.c:label2str Unexecuted instantiation: affinitymap_northbound.c:label2str Unexecuted instantiation: bfd.c:label2str Unexecuted instantiation: command.c:label2str Unexecuted instantiation: cspf.c:label2str Unexecuted instantiation: filter.c:label2str Unexecuted instantiation: filter_cli.c:label2str Unexecuted instantiation: filter_nb.c:label2str Unexecuted instantiation: ldp_sync.c:label2str Unexecuted instantiation: libfrr.c:label2str Unexecuted instantiation: link_state.c:label2str Unexecuted instantiation: log.c:label2str Unexecuted instantiation: mgmt_be_client.c:label2str Unexecuted instantiation: mgmt_fe_client.c:label2str Unexecuted instantiation: mgmt_msg.c:label2str Unexecuted instantiation: mlag.c:label2str Unexecuted instantiation: mpls.c:label2str Unexecuted instantiation: nexthop.c:label2str Unexecuted instantiation: nexthop_group.c:label2str Unexecuted instantiation: plist.c:label2str Unexecuted instantiation: pullwr.c:label2str Unexecuted instantiation: routemap.c:label2str Unexecuted instantiation: routemap_cli.c:label2str Unexecuted instantiation: routemap_northbound.c:label2str Unexecuted instantiation: stream.c:label2str Unexecuted instantiation: yang_wrappers.c:label2str Unexecuted instantiation: zclient.c:label2str Unexecuted instantiation: tc.c:label2str Unexecuted instantiation: connected.c:label2str Unexecuted instantiation: if_netlink.c:label2str Unexecuted instantiation: interface.c:label2str Unexecuted instantiation: ioctl.c:label2str Unexecuted instantiation: kernel_netlink.c:label2str Unexecuted instantiation: label_manager.c:label2str Unexecuted instantiation: main.c:label2str Unexecuted instantiation: netconf_netlink.c:label2str Unexecuted instantiation: redistribute.c:label2str Unexecuted instantiation: router-id.c:label2str Unexecuted instantiation: rt_netlink.c:label2str Unexecuted instantiation: rtadv.c:label2str Unexecuted instantiation: rtread_netlink.c:label2str Unexecuted instantiation: rule_netlink.c:label2str Unexecuted instantiation: table_manager.c:label2str Unexecuted instantiation: tc_netlink.c:label2str Unexecuted instantiation: zapi_msg.c:label2str Unexecuted instantiation: zebra_affinitymap.c:label2str Unexecuted instantiation: zebra_dplane.c:label2str Unexecuted instantiation: zebra_gr.c:label2str Unexecuted instantiation: zebra_l2.c:label2str Unexecuted instantiation: zebra_l2_bridge_if.c:label2str Unexecuted instantiation: zebra_evpn.c:label2str Unexecuted instantiation: zebra_evpn_mac.c:label2str Unexecuted instantiation: zebra_evpn_neigh.c:label2str Unexecuted instantiation: zebra_mlag.c:label2str Unexecuted instantiation: zebra_mlag_vty.c:label2str Unexecuted instantiation: zebra_mpls.c:label2str Unexecuted instantiation: zebra_mpls_netlink.c:label2str Unexecuted instantiation: zebra_mpls_null.c:label2str Unexecuted instantiation: zebra_mpls_vty.c:label2str Unexecuted instantiation: zebra_srv6.c:label2str Unexecuted instantiation: zebra_srv6_vty.c:label2str Unexecuted instantiation: zebra_mroute.c:label2str Unexecuted instantiation: zebra_nb.c:label2str Unexecuted instantiation: zebra_nb_config.c:label2str Unexecuted instantiation: zebra_nb_rpcs.c:label2str Unexecuted instantiation: zebra_nb_state.c:label2str Unexecuted instantiation: zebra_netns_id.c:label2str Unexecuted instantiation: zebra_netns_notify.c:label2str Unexecuted instantiation: zebra_nhg.c:label2str Unexecuted instantiation: zebra_ns.c:label2str Unexecuted instantiation: zebra_opaque.c:label2str Unexecuted instantiation: zebra_pbr.c:label2str Unexecuted instantiation: zebra_ptm.c:label2str Unexecuted instantiation: zebra_ptm_redistribute.c:label2str Unexecuted instantiation: zebra_pw.c:label2str Unexecuted instantiation: zebra_rib.c:label2str Unexecuted instantiation: zebra_router.c:label2str Unexecuted instantiation: zebra_rnh.c:label2str Unexecuted instantiation: zebra_routemap.c:label2str Unexecuted instantiation: zebra_routemap_nb_config.c:label2str Unexecuted instantiation: zebra_script.c:label2str Unexecuted instantiation: zebra_srte.c:label2str Unexecuted instantiation: zebra_tc.c:label2str Unexecuted instantiation: zebra_vrf.c:label2str Unexecuted instantiation: zebra_vty.c:label2str Unexecuted instantiation: zebra_vxlan.c:label2str Unexecuted instantiation: zebra_vxlan_if.c:label2str Unexecuted instantiation: zebra_evpn_mh.c:label2str Unexecuted instantiation: zebra_neigh.c:label2str Unexecuted instantiation: zserv.c:label2str Unexecuted instantiation: debug_nl.c:label2str Unexecuted instantiation: bgp_main.c:label2str Unexecuted instantiation: bgp_attr.c:label2str Unexecuted instantiation: bgp_attr_evpn.c:label2str Unexecuted instantiation: bgp_clist.c:label2str Unexecuted instantiation: bgp_community.c:label2str Unexecuted instantiation: bgp_community_alias.c:label2str Unexecuted instantiation: bgp_debug.c:label2str Unexecuted instantiation: bgp_dump.c:label2str Unexecuted instantiation: bgp_ecommunity.c:label2str Unexecuted instantiation: bgp_evpn.c:label2str Unexecuted instantiation: bgp_evpn_mh.c:label2str Unexecuted instantiation: bgp_evpn_vty.c:label2str Unexecuted instantiation: bgp_filter.c:label2str Unexecuted instantiation: bgp_flowspec_vty.c:label2str Unexecuted instantiation: bgp_fsm.c:label2str Unexecuted instantiation: bgp_io.c:label2str Unexecuted instantiation: bgp_keepalives.c:label2str Unexecuted instantiation: bgp_labelpool.c:label2str Unexecuted instantiation: bgp_lcommunity.c:label2str Unexecuted instantiation: bgp_mac.c:label2str Unexecuted instantiation: bgp_mpath.c:label2str Unexecuted instantiation: bgp_mplsvpn.c:label2str Unexecuted instantiation: bgp_network.c:label2str Unexecuted instantiation: bgp_nexthop.c:label2str Unexecuted instantiation: bgp_nht.c:label2str Unexecuted instantiation: bgp_packet.c:label2str Unexecuted instantiation: bgp_pbr.c:label2str Unexecuted instantiation: bgp_rd.c:label2str Unexecuted instantiation: bgp_regex.c:label2str Unexecuted instantiation: bgp_route.c:label2str Unexecuted instantiation: bgp_routemap.c:label2str Unexecuted instantiation: bgp_routemap_nb.c:label2str Unexecuted instantiation: bgp_routemap_nb_config.c:label2str Unexecuted instantiation: bgp_table.c:label2str Unexecuted instantiation: bgp_updgrp.c:label2str Unexecuted instantiation: bgp_updgrp_adv.c:label2str Unexecuted instantiation: bgp_updgrp_packet.c:label2str Unexecuted instantiation: bgp_vpn.c:label2str Unexecuted instantiation: bgp_vty.c:label2str Unexecuted instantiation: bgp_zebra.c:label2str Unexecuted instantiation: bgpd.c:label2str Unexecuted instantiation: bgp_rfapi_cfg.c:label2str Unexecuted instantiation: rfapi_import.c:label2str Unexecuted instantiation: rfapi.c:label2str Unexecuted instantiation: rfapi_ap.c:label2str Unexecuted instantiation: rfapi_encap_tlv.c:label2str Unexecuted instantiation: rfapi_nve_addr.c:label2str Unexecuted instantiation: rfapi_monitor.c:label2str Unexecuted instantiation: rfapi_rib.c:label2str Unexecuted instantiation: rfapi_vty.c:label2str Unexecuted instantiation: vnc_debug.c:label2str Unexecuted instantiation: vnc_export_bgp.c:label2str Unexecuted instantiation: vnc_export_table.c:label2str Unexecuted instantiation: vnc_import_bgp.c:label2str Unexecuted instantiation: vnc_zebra.c:label2str Unexecuted instantiation: bgp_addpath.c:label2str Unexecuted instantiation: bgp_advertise.c:label2str Unexecuted instantiation: bgp_aspath.c:label2str Unexecuted instantiation: bgp_bfd.c:label2str Unexecuted instantiation: bgp_conditional_adv.c:label2str Unexecuted instantiation: bgp_damp.c:label2str Unexecuted instantiation: bgp_encap_tlv.c:label2str Unexecuted instantiation: bgp_flowspec.c:label2str Unexecuted instantiation: bgp_flowspec_util.c:label2str Unexecuted instantiation: bgp_label.c:label2str Unexecuted instantiation: bgp_open.c:label2str Unexecuted instantiation: rfp_example.c:label2str Unexecuted instantiation: pim_assert.c:label2str Unexecuted instantiation: pim_bfd.c:label2str Unexecuted instantiation: pim_bsm.c:label2str Unexecuted instantiation: pim_cmd_common.c:label2str Unexecuted instantiation: pim_hello.c:label2str Unexecuted instantiation: pim_iface.c:label2str Unexecuted instantiation: pim_ifchannel.c:label2str Unexecuted instantiation: pim_instance.c:label2str Unexecuted instantiation: pim_join.c:label2str Unexecuted instantiation: pim_jp_agg.c:label2str Unexecuted instantiation: pim_macro.c:label2str Unexecuted instantiation: pim_mroute.c:label2str Unexecuted instantiation: pim_msg.c:label2str Unexecuted instantiation: pim_nb_config.c:label2str Unexecuted instantiation: pim_neighbor.c:label2str Unexecuted instantiation: pim_nht.c:label2str Unexecuted instantiation: pim_oil.c:label2str Unexecuted instantiation: pim_pim.c:label2str Unexecuted instantiation: pim_routemap.c:label2str Unexecuted instantiation: pim_rp.c:label2str Unexecuted instantiation: pim_rpf.c:label2str Unexecuted instantiation: pim_sock.c:label2str Unexecuted instantiation: pim_ssm.c:label2str Unexecuted instantiation: pim_ssmpingd.c:label2str Unexecuted instantiation: pim_static.c:label2str Unexecuted instantiation: pim_tib.c:label2str Unexecuted instantiation: pim_tlv.c:label2str Unexecuted instantiation: pim_upstream.c:label2str Unexecuted instantiation: pim_util.c:label2str Unexecuted instantiation: pim_vty.c:label2str Unexecuted instantiation: pim_zebra.c:label2str Unexecuted instantiation: pim_zlookup.c:label2str Unexecuted instantiation: pim_vxlan.c:label2str Unexecuted instantiation: pim_register.c:label2str Unexecuted instantiation: pimd.c:label2str Unexecuted instantiation: pim_cmd.c:label2str Unexecuted instantiation: pim_igmp.c:label2str Unexecuted instantiation: pim_igmp_mtrace.c:label2str Unexecuted instantiation: pim_igmpv2.c:label2str Unexecuted instantiation: pim_igmpv3.c:label2str Unexecuted instantiation: pim_main.c:label2str Unexecuted instantiation: pim_mlag.c:label2str Unexecuted instantiation: pim_msdp.c:label2str Unexecuted instantiation: pim_msdp_packet.c:label2str Unexecuted instantiation: pim_msdp_socket.c:label2str Unexecuted instantiation: pim_signals.c:label2str Unexecuted instantiation: pim_zpthread.c:label2str |
224 | | |
225 | | /* |
226 | | * String to label conversion, labels separated by '/'. |
227 | | */ |
228 | | int mpls_str2label(const char *label_str, uint8_t *num_labels, |
229 | | mpls_label_t *labels); |
230 | | |
231 | | /* Generic string buffer for label-stack-to-str */ |
232 | 0 | #define MPLS_LABEL_STRLEN 1024 |
233 | | |
234 | | /* |
235 | | * Label to string conversion, labels in string separated by '/'. |
236 | | */ |
237 | | char *mpls_label2str(uint8_t num_labels, const mpls_label_t *labels, char *buf, |
238 | | int len, enum lsp_types_t type, int pretty); |
239 | | |
240 | | #ifdef __cplusplus |
241 | | } |
242 | | #endif |
243 | | |
244 | | #endif |