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 attr_extra
*attre
= attr
->extra
;
166 struct rfapi_un_option
*uo
= NULL
;
167 struct rfapi_tunneltype_option
*tto
;
169 struct bgp_attr_encap_subtlv
*stlv
;
174 /* no tunnel encap attr stored */
175 if (!attre
->encap_tunneltype
)
178 stlv
= attre
->encap_subtlvs
;
180 uo
= XCALLOC (MTYPE_RFAPI_UN_OPTION
, sizeof (struct rfapi_un_option
));
182 uo
->type
= RFAPI_UN_OPTION_TYPE_TUNNELTYPE
;
183 uo
->v
.tunnel
.type
= attre
->encap_tunneltype
;
186 switch (attre
->encap_tunneltype
)
188 case BGP_ENCAP_TYPE_L2TPV3_OVER_IP
:
189 rc
= tlv_to_bgp_encap_type_l2tpv3overip (stlv
, &tto
->bgpinfo
.l2tpv3_ip
);
192 case BGP_ENCAP_TYPE_GRE
:
193 rc
= tlv_to_bgp_encap_type_gre (stlv
, &tto
->bgpinfo
.gre
);
196 case BGP_ENCAP_TYPE_TRANSMIT_TUNNEL_ENDPOINT
:
197 rc
= tlv_to_bgp_encap_type_transmit_tunnel_endpoint (stlv
,
198 &tto
->bgpinfo
.transmit_tunnel_endpoint
);
201 case BGP_ENCAP_TYPE_IPSEC_IN_TUNNEL_MODE
:
202 rc
= tlv_to_bgp_encap_type_ipsec_in_tunnel_mode (stlv
,
203 &tto
->bgpinfo
.ipsec_tunnel
);
206 case BGP_ENCAP_TYPE_IP_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
208 tlv_to_bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode (stlv
,
209 &tto
->bgpinfo
.ip_ipsec
);
212 case BGP_ENCAP_TYPE_MPLS_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
214 tlv_to_bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode
215 (stlv
, &tto
->bgpinfo
.mpls_ipsec
);
218 case BGP_ENCAP_TYPE_IP_IN_IP
:
219 rc
= tlv_to_bgp_encap_type_ip_in_ip (stlv
, &tto
->bgpinfo
.ip_ip
);
222 case BGP_ENCAP_TYPE_VXLAN
:
223 rc
= tlv_to_bgp_encap_type_vxlan (stlv
, &tto
->bgpinfo
.vxlan
);
226 case BGP_ENCAP_TYPE_NVGRE
:
227 rc
= tlv_to_bgp_encap_type_nvgre (stlv
, &tto
->bgpinfo
.nvgre
);
230 case BGP_ENCAP_TYPE_MPLS
:
231 rc
= tlv_to_bgp_encap_type_mpls (stlv
, &tto
->bgpinfo
.mpls
);
234 case BGP_ENCAP_TYPE_MPLS_IN_GRE
:
235 rc
= tlv_to_bgp_encap_type_mpls_in_gre (stlv
, &tto
->bgpinfo
.mpls_gre
);
238 case BGP_ENCAP_TYPE_VXLAN_GPE
:
239 rc
= tlv_to_bgp_encap_type_vxlan_gpe (stlv
, &tto
->bgpinfo
.vxlan_gpe
);
242 case BGP_ENCAP_TYPE_MPLS_IN_UDP
:
243 rc
= tlv_to_bgp_encap_type_mpls_in_udp (stlv
, &tto
->bgpinfo
.mpls_udp
);
246 case BGP_ENCAP_TYPE_PBB
:
247 rc
= tlv_to_bgp_encap_type_pbb (stlv
, &tto
->bgpinfo
.pbb
);
251 vnc_zlog_debug_verbose ("%s: unknown tunnel type %d",
252 __func__
, attre
->encap_tunneltype
);
258 XFREE (MTYPE_RFAPI_UN_OPTION
, uo
);
264 /***********************************************************************
266 ***********************************************************************/
269 subtlv_print_encap_l2tpv3_over_ip (
272 struct bgp_tea_subtlv_encap_l2tpv3_over_ip
*st
)
274 int (*fp
) (void *, const char *, ...);
277 const char *vty_newline
;
279 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
284 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(L2TPv3 over IP)",
286 fp (out
, "%*s SessionID: %d%s", column_offset
, "", st
->sessionid
,
288 fp (out
, "%*s Cookie: (length %d)%s", column_offset
, "", st
->cookie_length
,
293 subtlv_print_encap_gre (
296 struct bgp_tea_subtlv_encap_gre_key
*st
)
298 int (*fp
) (void *, const char *, ...);
301 const char *vty_newline
;
303 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
308 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(GRE)", vty_newline
);
309 fp (out
, "%*s GRE key: %d (0x%x)%s", column_offset
, "", st
->gre_key
,
310 st
->gre_key
, vty_newline
);
314 subtlv_print_encap_pbb (
317 struct bgp_tea_subtlv_encap_pbb
*st
)
319 int (*fp
) (void *, const char *, ...);
322 const char *vty_newline
;
324 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
329 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(PBB)", vty_newline
);
332 fp (out
, "%*s ISID: %d (0x%x)%s", column_offset
, "", st
->isid
,
333 st
->isid
, vty_newline
);
337 fp (out
, "%*s VID: %d (0x%x)%s", column_offset
, "", st
->vid
, st
->vid
,
340 fp (out
, "%*s MACADDR %02x:%02x:%02x:%02x:%02x:%02x%s",
345 st
->macaddr
[3], st
->macaddr
[4], st
->macaddr
[5], vty_newline
);
349 subtlv_print_proto_type (
352 struct bgp_tea_subtlv_proto_type
*st
)
354 int (*fp
) (void *, const char *, ...);
357 const char *vty_newline
;
359 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
364 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(Proto Type)",
366 fp (out
, "%*s Proto %d (0x%x)%s", column_offset
, "", st
->proto
, st
->proto
,
374 struct bgp_tea_subtlv_color
*st
)
376 int (*fp
) (void *, const char *, ...);
379 const char *vty_newline
;
381 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
386 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Color", vty_newline
);
387 fp (out
, "%*s Color: %d (0x%x)", column_offset
, "", st
->color
, st
->color
,
392 subtlv_print_ipsec_ta (
395 struct bgp_tea_subtlv_ipsec_ta
*st
)
397 int (*fp
) (void *, const char *, ...);
400 const char *vty_newline
;
402 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
407 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: IPSEC TA", vty_newline
);
408 fp (out
, "%*s Authenticator Type: %d (0x%x)", column_offset
, "",
409 st
->authenticator_type
, st
->authenticator_type
, vty_newline
);
410 fp (out
, "%*s Authenticator: (length %d)", column_offset
, "",
411 st
->authenticator_length
, vty_newline
);
414 /***********************************************************************
416 ***********************************************************************/
419 print_encap_type_l2tpv3overip (
422 struct bgp_encap_type_l2tpv3_over_ip
*bet
)
424 const char *type
= "L2TPv3 over IP";
425 int (*fp
) (void *, const char *, ...);
428 const char *vty_newline
;
430 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
435 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
437 subtlv_print_encap_l2tpv3_over_ip (stream
, column_offset
+ 2,
439 subtlv_print_proto_type (stream
, column_offset
+ 2, &bet
->st_proto
);
440 subtlv_print_color (stream
, column_offset
+ 2, &bet
->st_color
);
444 print_encap_type_gre (
447 struct bgp_encap_type_gre
*bet
)
449 const char *type
= "GRE";
450 int (*fp
) (void *, const char *, ...);
453 const char *vty_newline
;
455 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
460 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
462 subtlv_print_encap_gre (stream
, column_offset
+ 2, &bet
->st_encap
);
463 subtlv_print_proto_type (stream
, column_offset
+ 2, &bet
->st_proto
);
464 subtlv_print_color (stream
, column_offset
+ 2, &bet
->st_color
);
468 print_encap_type_ip_in_ip (
471 struct bgp_encap_type_ip_in_ip
*bet
)
473 const char *type
= "IP in IP";
474 int (*fp
) (void *, const char *, ...);
477 const char *vty_newline
;
479 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
484 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
486 subtlv_print_proto_type (stream
, column_offset
+ 2, &bet
->st_proto
);
487 subtlv_print_color (stream
, column_offset
+ 2, &bet
->st_color
);
491 print_encap_type_transmit_tunnel_endpoint (
494 struct bgp_encap_type_transmit_tunnel_endpoint
*bet
)
496 const char *type
= "Transmit Tunnel Endpoint";
497 int (*fp
) (void *, const char *, ...);
500 const char *vty_newline
;
502 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
507 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
509 /* no subtlvs for this type */
513 print_encap_type_ipsec_in_tunnel_mode (
516 struct bgp_encap_type_ipsec_in_tunnel_mode
*bet
)
518 const char *type
= "IPSEC in Tunnel mode";
519 int (*fp
) (void *, const char *, ...);
522 const char *vty_newline
;
524 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
529 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
530 subtlv_print_ipsec_ta (stream
, column_offset
+ 2, &bet
->st_ipsec_ta
);
534 print_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode (
537 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode
*bet
)
539 const char *type
= "IP in IP Tunnel with IPSEC transport mode";
540 int (*fp
) (void *, const char *, ...);
543 const char *vty_newline
;
545 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
550 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
552 subtlv_print_ipsec_ta (stream
, column_offset
+ 2, &bet
->st_ipsec_ta
);
556 print_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode (
559 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode
*bet
)
561 const char *type
= "MPLS in IP Tunnel with IPSEC transport mode";
562 int (*fp
) (void *, const char *, ...);
565 const char *vty_newline
;
567 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
572 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
574 subtlv_print_ipsec_ta (stream
, column_offset
+ 2, &bet
->st_ipsec_ta
);
579 print_encap_type_pbb (
582 struct bgp_encap_type_pbb
*bet
)
584 const char *type
= "PBB";
585 int (*fp
) (void *, const char *, ...);
588 const char *vty_newline
;
590 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
595 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
597 subtlv_print_encap_pbb (stream
, column_offset
+ 2, &bet
->st_encap
);
602 print_encap_type_vxlan (
605 struct bgp_encap_type_vxlan
*bet
)
607 const char *type
= "VXLAN";
608 int (*fp
) (void *, const char *, ...);
611 const char *vty_newline
;
613 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
618 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
620 /* no subtlvs for this type */
625 print_encap_type_nvgre (
628 struct bgp_encap_type_nvgre
*bet
)
630 const char *type
= "NVGRE";
631 int (*fp
) (void *, const char *, ...);
634 const char *vty_newline
;
636 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
641 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
643 /* no subtlvs for this type */
647 print_encap_type_mpls (
650 struct bgp_encap_type_mpls
*bet
)
652 const char *type
= "MPLS";
653 int (*fp
) (void *, const char *, ...);
656 const char *vty_newline
;
658 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
663 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
665 /* no subtlvs for this type */
669 print_encap_type_mpls_in_gre (
672 struct bgp_encap_type_mpls_in_gre
*bet
)
674 const char *type
= "MPLS in GRE";
675 int (*fp
) (void *, const char *, ...);
678 const char *vty_newline
;
680 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
685 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
687 /* no subtlvs for this type */
691 print_encap_type_vxlan_gpe (
694 struct bgp_encap_type_vxlan_gpe
*bet
)
696 const char *type
= "VXLAN GPE";
697 int (*fp
) (void *, const char *, ...);
700 const char *vty_newline
;
702 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
707 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
709 /* no subtlvs for this type */
713 print_encap_type_mpls_in_udp (
716 struct bgp_encap_type_mpls_in_udp
*bet
)
718 const char *type
= "MPLS in UDP";
719 int (*fp
) (void *, const char *, ...);
722 const char *vty_newline
;
724 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
729 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
731 /* no subtlvs for this type */
735 rfapi_print_tunneltype_option (
738 struct rfapi_tunneltype_option
*tto
)
742 case BGP_ENCAP_TYPE_L2TPV3_OVER_IP
:
743 print_encap_type_l2tpv3overip (stream
, column_offset
,
744 &tto
->bgpinfo
.l2tpv3_ip
);
747 case BGP_ENCAP_TYPE_GRE
:
748 print_encap_type_gre (stream
, column_offset
, &tto
->bgpinfo
.gre
);
751 case BGP_ENCAP_TYPE_TRANSMIT_TUNNEL_ENDPOINT
:
752 print_encap_type_transmit_tunnel_endpoint (stream
, column_offset
,
753 &tto
->bgpinfo
.transmit_tunnel_endpoint
);
756 case BGP_ENCAP_TYPE_IPSEC_IN_TUNNEL_MODE
:
757 print_encap_type_ipsec_in_tunnel_mode (stream
, column_offset
,
758 &tto
->bgpinfo
.ipsec_tunnel
);
761 case BGP_ENCAP_TYPE_IP_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
762 print_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode (stream
,
764 &tto
->bgpinfo
.ip_ipsec
);
767 case BGP_ENCAP_TYPE_MPLS_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
768 print_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode (stream
,
770 &tto
->bgpinfo
.mpls_ipsec
);
773 case BGP_ENCAP_TYPE_IP_IN_IP
:
774 print_encap_type_ip_in_ip (stream
, column_offset
, &tto
->bgpinfo
.ip_ip
);
777 case BGP_ENCAP_TYPE_VXLAN
:
778 print_encap_type_vxlan (stream
, column_offset
, &tto
->bgpinfo
.vxlan
);
781 case BGP_ENCAP_TYPE_NVGRE
:
782 print_encap_type_nvgre (stream
, column_offset
, &tto
->bgpinfo
.nvgre
);
785 case BGP_ENCAP_TYPE_MPLS
:
786 print_encap_type_mpls (stream
, column_offset
, &tto
->bgpinfo
.mpls
);
789 case BGP_ENCAP_TYPE_MPLS_IN_GRE
:
790 print_encap_type_mpls_in_gre (stream
, column_offset
,
791 &tto
->bgpinfo
.mpls_gre
);
794 case BGP_ENCAP_TYPE_VXLAN_GPE
:
795 print_encap_type_vxlan_gpe (stream
, column_offset
,
796 &tto
->bgpinfo
.vxlan_gpe
);
799 case BGP_ENCAP_TYPE_MPLS_IN_UDP
:
800 print_encap_type_mpls_in_udp (stream
, column_offset
,
801 &tto
->bgpinfo
.mpls_udp
);
804 case BGP_ENCAP_TYPE_PBB
:
805 print_encap_type_pbb (stream
, column_offset
, &tto
->bgpinfo
.pbb
);