2 * Copyright 2015-2016, LabN Consulting, L.L.C.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; see the file COPYING; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #include "lib/zebra.h"
21 #include "lib/memory.h"
22 #include "lib/prefix.h"
23 #include "lib/table.h"
26 #include "bgpd/bgpd.h"
27 #include "bgpd/bgp_attr.h"
29 #include "bgpd/bgp_encap_types.h"
30 #include "bgpd/bgp_encap_tlv.h"
32 #include "bgpd/rfapi/rfapi.h"
33 #include "bgpd/rfapi/rfapi_encap_tlv.h"
34 #include "bgpd/rfapi/rfapi_private.h"
35 #include "bgpd/rfapi/rfapi_monitor.h"
36 #include "bgpd/rfapi/rfapi_vty.h"
37 #include "bgpd/rfapi/bgp_rfapi_cfg.h"
38 #include "bgpd/rfapi/vnc_debug.h"
41 rfapi_add_endpoint_address_to_subtlv (
43 struct rfapi_ip_addr
*ea
,
44 struct bgp_tea_subtlv_remote_endpoint
*subtlv
)
46 subtlv
->family
= ea
->addr_family
;
47 if (subtlv
->family
== AF_INET
)
48 subtlv
->ip_address
.v4
= ea
->addr
.v4
;
50 subtlv
->ip_address
.v6
= ea
->addr
.v6
;
51 subtlv
->as4
= htonl (bgp
->as
);
55 rfapi_tunneltype_option_to_tlv (
57 struct rfapi_ip_addr
*ea
,
58 struct rfapi_tunneltype_option
*tto
,
63 #define _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS(ttype) \
64 if ((always_add || (bgp->rfapi_cfg && \
65 !CHECK_FLAG(bgp->rfapi_cfg->flags, \
66 BGP_VNC_CONFIG_ADV_UN_METHOD_ENCAP))) && \
67 ea && !CHECK_SUBTLV_FLAG(&tto->bgpinfo.ttype, \
68 BGP_TEA_SUBTLV_REMOTE_ENDPOINT)) { \
69 rfapi_add_endpoint_address_to_subtlv(bgp, ea, \
70 &tto->bgpinfo.ttype.st_endpoint); \
71 SET_SUBTLV_FLAG(&tto->bgpinfo.ttype, BGP_TEA_SUBTLV_REMOTE_ENDPOINT); \
74 struct rfapi_tunneltype_option dto
;
76 { /* create default type */
78 memset (tto
, 0, sizeof (dto
));
79 tto
->type
= RFAPI_BGP_ENCAP_TYPE_DEFAULT
;
83 case BGP_ENCAP_TYPE_L2TPV3_OVER_IP
:
84 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (l2tpv3_ip
);
85 bgp_encap_type_l2tpv3overip_to_tlv (&tto
->bgpinfo
.l2tpv3_ip
, attr
);
88 case BGP_ENCAP_TYPE_GRE
:
89 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (gre
);
90 bgp_encap_type_gre_to_tlv (&tto
->bgpinfo
.gre
, attr
);
93 case BGP_ENCAP_TYPE_TRANSMIT_TUNNEL_ENDPOINT
:
94 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (transmit_tunnel_endpoint
);
95 bgp_encap_type_transmit_tunnel_endpoint (&tto
->bgpinfo
.transmit_tunnel_endpoint
,
99 case BGP_ENCAP_TYPE_IPSEC_IN_TUNNEL_MODE
:
100 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (ipsec_tunnel
);
101 bgp_encap_type_ipsec_in_tunnel_mode_to_tlv (&tto
->bgpinfo
.ipsec_tunnel
,
105 case BGP_ENCAP_TYPE_IP_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
106 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (ip_ipsec
);
107 bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode_to_tlv
108 (&tto
->bgpinfo
.ip_ipsec
, attr
);
111 case BGP_ENCAP_TYPE_MPLS_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
112 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (mpls_ipsec
);
113 bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode_to_tlv
114 (&tto
->bgpinfo
.mpls_ipsec
, attr
);
117 case BGP_ENCAP_TYPE_IP_IN_IP
:
118 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (ip_ip
);
119 bgp_encap_type_ip_in_ip_to_tlv (&tto
->bgpinfo
.ip_ip
, attr
);
122 case BGP_ENCAP_TYPE_VXLAN
:
123 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (vxlan
);
124 bgp_encap_type_vxlan_to_tlv (&tto
->bgpinfo
.vxlan
, attr
);
127 case BGP_ENCAP_TYPE_NVGRE
:
128 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (nvgre
);
129 bgp_encap_type_nvgre_to_tlv (&tto
->bgpinfo
.nvgre
, attr
);
132 case BGP_ENCAP_TYPE_MPLS
:
133 /* nothing to do for MPLS */
136 case BGP_ENCAP_TYPE_MPLS_IN_GRE
:
137 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (mpls_gre
);
138 bgp_encap_type_mpls_in_gre_to_tlv (&tto
->bgpinfo
.mpls_gre
, attr
);
141 case BGP_ENCAP_TYPE_VXLAN_GPE
:
142 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (vxlan_gpe
);
143 bgp_encap_type_vxlan_gpe_to_tlv (&tto
->bgpinfo
.vxlan_gpe
, attr
);
146 case BGP_ENCAP_TYPE_MPLS_IN_UDP
:
147 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (mpls_udp
);
148 bgp_encap_type_mpls_in_udp_to_tlv (&tto
->bgpinfo
.mpls_udp
, attr
);
151 case BGP_ENCAP_TYPE_PBB
:
152 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (pbb
);
153 bgp_encap_type_pbb_to_tlv (&tto
->bgpinfo
.pbb
, attr
);
162 struct rfapi_un_option
*
163 rfapi_encap_tlv_to_un_option (struct attr
*attr
)
165 struct rfapi_un_option
*uo
= NULL
;
166 struct rfapi_tunneltype_option
*tto
;
168 struct bgp_attr_encap_subtlv
*stlv
;
170 /* no tunnel encap attr stored */
171 if (!attr
->encap_tunneltype
)
174 stlv
= attr
->encap_subtlvs
;
176 uo
= XCALLOC (MTYPE_RFAPI_UN_OPTION
, sizeof (struct rfapi_un_option
));
178 uo
->type
= RFAPI_UN_OPTION_TYPE_TUNNELTYPE
;
179 uo
->v
.tunnel
.type
= attr
->encap_tunneltype
;
182 switch (attr
->encap_tunneltype
)
184 case BGP_ENCAP_TYPE_L2TPV3_OVER_IP
:
185 rc
= tlv_to_bgp_encap_type_l2tpv3overip (stlv
, &tto
->bgpinfo
.l2tpv3_ip
);
188 case BGP_ENCAP_TYPE_GRE
:
189 rc
= tlv_to_bgp_encap_type_gre (stlv
, &tto
->bgpinfo
.gre
);
192 case BGP_ENCAP_TYPE_TRANSMIT_TUNNEL_ENDPOINT
:
193 rc
= tlv_to_bgp_encap_type_transmit_tunnel_endpoint (stlv
,
194 &tto
->bgpinfo
.transmit_tunnel_endpoint
);
197 case BGP_ENCAP_TYPE_IPSEC_IN_TUNNEL_MODE
:
198 rc
= tlv_to_bgp_encap_type_ipsec_in_tunnel_mode (stlv
,
199 &tto
->bgpinfo
.ipsec_tunnel
);
202 case BGP_ENCAP_TYPE_IP_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
204 tlv_to_bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode (stlv
,
205 &tto
->bgpinfo
.ip_ipsec
);
208 case BGP_ENCAP_TYPE_MPLS_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
210 tlv_to_bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode
211 (stlv
, &tto
->bgpinfo
.mpls_ipsec
);
214 case BGP_ENCAP_TYPE_IP_IN_IP
:
215 rc
= tlv_to_bgp_encap_type_ip_in_ip (stlv
, &tto
->bgpinfo
.ip_ip
);
218 case BGP_ENCAP_TYPE_VXLAN
:
219 rc
= tlv_to_bgp_encap_type_vxlan (stlv
, &tto
->bgpinfo
.vxlan
);
222 case BGP_ENCAP_TYPE_NVGRE
:
223 rc
= tlv_to_bgp_encap_type_nvgre (stlv
, &tto
->bgpinfo
.nvgre
);
226 case BGP_ENCAP_TYPE_MPLS
:
227 rc
= tlv_to_bgp_encap_type_mpls (stlv
, &tto
->bgpinfo
.mpls
);
230 case BGP_ENCAP_TYPE_MPLS_IN_GRE
:
231 rc
= tlv_to_bgp_encap_type_mpls_in_gre (stlv
, &tto
->bgpinfo
.mpls_gre
);
234 case BGP_ENCAP_TYPE_VXLAN_GPE
:
235 rc
= tlv_to_bgp_encap_type_vxlan_gpe (stlv
, &tto
->bgpinfo
.vxlan_gpe
);
238 case BGP_ENCAP_TYPE_MPLS_IN_UDP
:
239 rc
= tlv_to_bgp_encap_type_mpls_in_udp (stlv
, &tto
->bgpinfo
.mpls_udp
);
242 case BGP_ENCAP_TYPE_PBB
:
243 rc
= tlv_to_bgp_encap_type_pbb (stlv
, &tto
->bgpinfo
.pbb
);
247 vnc_zlog_debug_verbose ("%s: unknown tunnel type %d",
248 __func__
, attr
->encap_tunneltype
);
254 XFREE (MTYPE_RFAPI_UN_OPTION
, uo
);
260 /***********************************************************************
262 ***********************************************************************/
265 subtlv_print_encap_l2tpv3_over_ip (
268 struct bgp_tea_subtlv_encap_l2tpv3_over_ip
*st
)
270 int (*fp
) (void *, const char *, ...);
273 const char *vty_newline
;
275 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
280 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(L2TPv3 over IP)",
282 fp (out
, "%*s SessionID: %d%s", column_offset
, "", st
->sessionid
,
284 fp (out
, "%*s Cookie: (length %d)%s", column_offset
, "", st
->cookie_length
,
289 subtlv_print_encap_gre (
292 struct bgp_tea_subtlv_encap_gre_key
*st
)
294 int (*fp
) (void *, const char *, ...);
297 const char *vty_newline
;
299 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
304 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(GRE)", vty_newline
);
305 fp (out
, "%*s GRE key: %d (0x%x)%s", column_offset
, "", st
->gre_key
,
306 st
->gre_key
, vty_newline
);
310 subtlv_print_encap_pbb (
313 struct bgp_tea_subtlv_encap_pbb
*st
)
315 int (*fp
) (void *, const char *, ...);
318 const char *vty_newline
;
320 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
325 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(PBB)", vty_newline
);
328 fp (out
, "%*s ISID: %d (0x%x)%s", column_offset
, "", st
->isid
,
329 st
->isid
, vty_newline
);
333 fp (out
, "%*s VID: %d (0x%x)%s", column_offset
, "", st
->vid
, st
->vid
,
336 fp (out
, "%*s MACADDR %02x:%02x:%02x:%02x:%02x:%02x%s",
341 st
->macaddr
[3], st
->macaddr
[4], st
->macaddr
[5], vty_newline
);
345 subtlv_print_proto_type (
348 struct bgp_tea_subtlv_proto_type
*st
)
350 int (*fp
) (void *, const char *, ...);
353 const char *vty_newline
;
355 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
360 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(Proto Type)",
362 fp (out
, "%*s Proto %d (0x%x)%s", column_offset
, "", st
->proto
, st
->proto
,
370 struct bgp_tea_subtlv_color
*st
)
372 int (*fp
) (void *, const char *, ...);
375 const char *vty_newline
;
377 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
382 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Color", vty_newline
);
383 fp (out
, "%*s Color: %d (0x%x)", column_offset
, "", st
->color
, st
->color
,
388 subtlv_print_ipsec_ta (
391 struct bgp_tea_subtlv_ipsec_ta
*st
)
393 int (*fp
) (void *, const char *, ...);
396 const char *vty_newline
;
398 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
403 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: IPSEC TA", vty_newline
);
404 fp (out
, "%*s Authenticator Type: %d (0x%x)", column_offset
, "",
405 st
->authenticator_type
, st
->authenticator_type
, vty_newline
);
406 fp (out
, "%*s Authenticator: (length %d)", column_offset
, "",
407 st
->authenticator_length
, vty_newline
);
410 /***********************************************************************
412 ***********************************************************************/
415 print_encap_type_l2tpv3overip (
418 struct bgp_encap_type_l2tpv3_over_ip
*bet
)
420 const char *type
= "L2TPv3 over IP";
421 int (*fp
) (void *, const char *, ...);
424 const char *vty_newline
;
426 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
431 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
433 subtlv_print_encap_l2tpv3_over_ip (stream
, column_offset
+ 2,
435 subtlv_print_proto_type (stream
, column_offset
+ 2, &bet
->st_proto
);
436 subtlv_print_color (stream
, column_offset
+ 2, &bet
->st_color
);
440 print_encap_type_gre (
443 struct bgp_encap_type_gre
*bet
)
445 const char *type
= "GRE";
446 int (*fp
) (void *, const char *, ...);
449 const char *vty_newline
;
451 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
456 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
458 subtlv_print_encap_gre (stream
, column_offset
+ 2, &bet
->st_encap
);
459 subtlv_print_proto_type (stream
, column_offset
+ 2, &bet
->st_proto
);
460 subtlv_print_color (stream
, column_offset
+ 2, &bet
->st_color
);
464 print_encap_type_ip_in_ip (
467 struct bgp_encap_type_ip_in_ip
*bet
)
469 const char *type
= "IP in IP";
470 int (*fp
) (void *, const char *, ...);
473 const char *vty_newline
;
475 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
480 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
482 subtlv_print_proto_type (stream
, column_offset
+ 2, &bet
->st_proto
);
483 subtlv_print_color (stream
, column_offset
+ 2, &bet
->st_color
);
487 print_encap_type_transmit_tunnel_endpoint (
490 struct bgp_encap_type_transmit_tunnel_endpoint
*bet
)
492 const char *type
= "Transmit Tunnel Endpoint";
493 int (*fp
) (void *, const char *, ...);
496 const char *vty_newline
;
498 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
503 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
505 /* no subtlvs for this type */
509 print_encap_type_ipsec_in_tunnel_mode (
512 struct bgp_encap_type_ipsec_in_tunnel_mode
*bet
)
514 const char *type
= "IPSEC in Tunnel mode";
515 int (*fp
) (void *, const char *, ...);
518 const char *vty_newline
;
520 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
525 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
526 subtlv_print_ipsec_ta (stream
, column_offset
+ 2, &bet
->st_ipsec_ta
);
530 print_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode (
533 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode
*bet
)
535 const char *type
= "IP in IP Tunnel with IPSEC transport mode";
536 int (*fp
) (void *, const char *, ...);
539 const char *vty_newline
;
541 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
546 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
548 subtlv_print_ipsec_ta (stream
, column_offset
+ 2, &bet
->st_ipsec_ta
);
552 print_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode (
555 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode
*bet
)
557 const char *type
= "MPLS in IP Tunnel with IPSEC transport mode";
558 int (*fp
) (void *, const char *, ...);
561 const char *vty_newline
;
563 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
568 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
570 subtlv_print_ipsec_ta (stream
, column_offset
+ 2, &bet
->st_ipsec_ta
);
575 print_encap_type_pbb (
578 struct bgp_encap_type_pbb
*bet
)
580 const char *type
= "PBB";
581 int (*fp
) (void *, const char *, ...);
584 const char *vty_newline
;
586 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
591 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
593 subtlv_print_encap_pbb (stream
, column_offset
+ 2, &bet
->st_encap
);
598 print_encap_type_vxlan (
601 struct bgp_encap_type_vxlan
*bet
)
603 const char *type
= "VXLAN";
604 int (*fp
) (void *, const char *, ...);
607 const char *vty_newline
;
609 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
614 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
616 /* no subtlvs for this type */
621 print_encap_type_nvgre (
624 struct bgp_encap_type_nvgre
*bet
)
626 const char *type
= "NVGRE";
627 int (*fp
) (void *, const char *, ...);
630 const char *vty_newline
;
632 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
637 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
639 /* no subtlvs for this type */
643 print_encap_type_mpls (
646 struct bgp_encap_type_mpls
*bet
)
648 const char *type
= "MPLS";
649 int (*fp
) (void *, const char *, ...);
652 const char *vty_newline
;
654 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
659 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
661 /* no subtlvs for this type */
665 print_encap_type_mpls_in_gre (
668 struct bgp_encap_type_mpls_in_gre
*bet
)
670 const char *type
= "MPLS in GRE";
671 int (*fp
) (void *, const char *, ...);
674 const char *vty_newline
;
676 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
681 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
683 /* no subtlvs for this type */
687 print_encap_type_vxlan_gpe (
690 struct bgp_encap_type_vxlan_gpe
*bet
)
692 const char *type
= "VXLAN GPE";
693 int (*fp
) (void *, const char *, ...);
696 const char *vty_newline
;
698 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
703 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
705 /* no subtlvs for this type */
709 print_encap_type_mpls_in_udp (
712 struct bgp_encap_type_mpls_in_udp
*bet
)
714 const char *type
= "MPLS in UDP";
715 int (*fp
) (void *, const char *, ...);
718 const char *vty_newline
;
720 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
725 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
727 /* no subtlvs for this type */
731 rfapi_print_tunneltype_option (
734 struct rfapi_tunneltype_option
*tto
)
738 case BGP_ENCAP_TYPE_L2TPV3_OVER_IP
:
739 print_encap_type_l2tpv3overip (stream
, column_offset
,
740 &tto
->bgpinfo
.l2tpv3_ip
);
743 case BGP_ENCAP_TYPE_GRE
:
744 print_encap_type_gre (stream
, column_offset
, &tto
->bgpinfo
.gre
);
747 case BGP_ENCAP_TYPE_TRANSMIT_TUNNEL_ENDPOINT
:
748 print_encap_type_transmit_tunnel_endpoint (stream
, column_offset
,
749 &tto
->bgpinfo
.transmit_tunnel_endpoint
);
752 case BGP_ENCAP_TYPE_IPSEC_IN_TUNNEL_MODE
:
753 print_encap_type_ipsec_in_tunnel_mode (stream
, column_offset
,
754 &tto
->bgpinfo
.ipsec_tunnel
);
757 case BGP_ENCAP_TYPE_IP_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
758 print_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode (stream
,
760 &tto
->bgpinfo
.ip_ipsec
);
763 case BGP_ENCAP_TYPE_MPLS_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
764 print_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode (stream
,
766 &tto
->bgpinfo
.mpls_ipsec
);
769 case BGP_ENCAP_TYPE_IP_IN_IP
:
770 print_encap_type_ip_in_ip (stream
, column_offset
, &tto
->bgpinfo
.ip_ip
);
773 case BGP_ENCAP_TYPE_VXLAN
:
774 print_encap_type_vxlan (stream
, column_offset
, &tto
->bgpinfo
.vxlan
);
777 case BGP_ENCAP_TYPE_NVGRE
:
778 print_encap_type_nvgre (stream
, column_offset
, &tto
->bgpinfo
.nvgre
);
781 case BGP_ENCAP_TYPE_MPLS
:
782 print_encap_type_mpls (stream
, column_offset
, &tto
->bgpinfo
.mpls
);
785 case BGP_ENCAP_TYPE_MPLS_IN_GRE
:
786 print_encap_type_mpls_in_gre (stream
, column_offset
,
787 &tto
->bgpinfo
.mpls_gre
);
790 case BGP_ENCAP_TYPE_VXLAN_GPE
:
791 print_encap_type_vxlan_gpe (stream
, column_offset
,
792 &tto
->bgpinfo
.vxlan_gpe
);
795 case BGP_ENCAP_TYPE_MPLS_IN_UDP
:
796 print_encap_type_mpls_in_udp (stream
, column_offset
,
797 &tto
->bgpinfo
.mpls_udp
);
800 case BGP_ENCAP_TYPE_PBB
:
801 print_encap_type_pbb (stream
, column_offset
, &tto
->bgpinfo
.pbb
);