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
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #include "lib/zebra.h"
22 #include "lib/memory.h"
23 #include "lib/prefix.h"
24 #include "lib/table.h"
27 #include "bgpd/bgpd.h"
28 #include "bgpd/bgp_attr.h"
30 #include "bgpd/bgp_encap_types.h"
31 #include "bgpd/bgp_encap_tlv.h"
33 #include "bgpd/rfapi/rfapi.h"
34 #include "bgpd/rfapi/rfapi_encap_tlv.h"
35 #include "bgpd/rfapi/rfapi_private.h"
36 #include "bgpd/rfapi/rfapi_monitor.h"
37 #include "bgpd/rfapi/rfapi_vty.h"
38 #include "bgpd/rfapi/bgp_rfapi_cfg.h"
39 #include "bgpd/rfapi/vnc_debug.h"
42 rfapi_add_endpoint_address_to_subtlv (
44 struct rfapi_ip_addr
*ea
,
45 struct bgp_tea_subtlv_remote_endpoint
*subtlv
)
47 subtlv
->family
= ea
->addr_family
;
48 if (subtlv
->family
== AF_INET
)
49 subtlv
->ip_address
.v4
= ea
->addr
.v4
;
51 subtlv
->ip_address
.v6
= ea
->addr
.v6
;
52 subtlv
->as4
= htonl (bgp
->as
);
56 rfapi_tunneltype_option_to_tlv (
58 struct rfapi_ip_addr
*ea
,
59 struct rfapi_tunneltype_option
*tto
,
64 #define _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS(ttype) \
65 if ((always_add || (bgp->rfapi_cfg && \
66 !CHECK_FLAG(bgp->rfapi_cfg->flags, \
67 BGP_VNC_CONFIG_ADV_UN_METHOD_ENCAP))) && \
68 ea && !CHECK_SUBTLV_FLAG(&tto->bgpinfo.ttype, \
69 BGP_TEA_SUBTLV_REMOTE_ENDPOINT)) { \
70 rfapi_add_endpoint_address_to_subtlv(bgp, ea, \
71 &tto->bgpinfo.ttype.st_endpoint); \
72 SET_SUBTLV_FLAG(&tto->bgpinfo.ttype, BGP_TEA_SUBTLV_REMOTE_ENDPOINT); \
75 struct rfapi_tunneltype_option dto
;
77 { /* create default type */
79 memset (tto
, 0, sizeof (dto
));
80 tto
->type
= RFAPI_BGP_ENCAP_TYPE_DEFAULT
;
84 case BGP_ENCAP_TYPE_L2TPV3_OVER_IP
:
85 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (l2tpv3_ip
);
86 bgp_encap_type_l2tpv3overip_to_tlv (&tto
->bgpinfo
.l2tpv3_ip
, attr
);
89 case BGP_ENCAP_TYPE_GRE
:
90 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (gre
);
91 bgp_encap_type_gre_to_tlv (&tto
->bgpinfo
.gre
, attr
);
94 case BGP_ENCAP_TYPE_TRANSMIT_TUNNEL_ENDPOINT
:
95 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (transmit_tunnel_endpoint
);
96 bgp_encap_type_transmit_tunnel_endpoint (&tto
->bgpinfo
.transmit_tunnel_endpoint
,
100 case BGP_ENCAP_TYPE_IPSEC_IN_TUNNEL_MODE
:
101 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (ipsec_tunnel
);
102 bgp_encap_type_ipsec_in_tunnel_mode_to_tlv (&tto
->bgpinfo
.ipsec_tunnel
,
106 case BGP_ENCAP_TYPE_IP_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
107 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (ip_ipsec
);
108 bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode_to_tlv
109 (&tto
->bgpinfo
.ip_ipsec
, attr
);
112 case BGP_ENCAP_TYPE_MPLS_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
113 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (mpls_ipsec
);
114 bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode_to_tlv
115 (&tto
->bgpinfo
.mpls_ipsec
, attr
);
118 case BGP_ENCAP_TYPE_IP_IN_IP
:
119 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (ip_ip
);
120 bgp_encap_type_ip_in_ip_to_tlv (&tto
->bgpinfo
.ip_ip
, attr
);
123 case BGP_ENCAP_TYPE_VXLAN
:
124 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (vxlan
);
125 bgp_encap_type_vxlan_to_tlv (&tto
->bgpinfo
.vxlan
, attr
);
128 case BGP_ENCAP_TYPE_NVGRE
:
129 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (nvgre
);
130 bgp_encap_type_nvgre_to_tlv (&tto
->bgpinfo
.nvgre
, attr
);
133 case BGP_ENCAP_TYPE_MPLS
:
134 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (mpls
);
135 bgp_encap_type_mpls_to_tlv (&tto
->bgpinfo
.mpls
, attr
);
138 case BGP_ENCAP_TYPE_MPLS_IN_GRE
:
139 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (mpls_gre
);
140 bgp_encap_type_mpls_in_gre_to_tlv (&tto
->bgpinfo
.mpls_gre
, attr
);
143 case BGP_ENCAP_TYPE_VXLAN_GPE
:
144 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (vxlan_gpe
);
145 bgp_encap_type_vxlan_gpe_to_tlv (&tto
->bgpinfo
.vxlan_gpe
, attr
);
148 case BGP_ENCAP_TYPE_MPLS_IN_UDP
:
149 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (mpls_udp
);
150 bgp_encap_type_mpls_in_udp_to_tlv (&tto
->bgpinfo
.mpls_udp
, attr
);
153 case BGP_ENCAP_TYPE_PBB
:
154 _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (pbb
);
155 bgp_encap_type_pbb_to_tlv (&tto
->bgpinfo
.pbb
, attr
);
164 struct rfapi_un_option
*
165 rfapi_encap_tlv_to_un_option (struct attr
*attr
)
167 struct attr_extra
*attre
= attr
->extra
;
168 struct rfapi_un_option
*uo
= NULL
;
169 struct rfapi_tunneltype_option
*tto
;
171 struct bgp_attr_encap_subtlv
*stlv
;
176 /* no tunnel encap attr stored */
177 if (!attre
->encap_tunneltype
)
180 stlv
= attre
->encap_subtlvs
;
182 uo
= XCALLOC (MTYPE_RFAPI_UN_OPTION
, sizeof (struct rfapi_un_option
));
184 uo
->type
= RFAPI_UN_OPTION_TYPE_TUNNELTYPE
;
185 uo
->v
.tunnel
.type
= attre
->encap_tunneltype
;
188 switch (attre
->encap_tunneltype
)
190 case BGP_ENCAP_TYPE_L2TPV3_OVER_IP
:
191 rc
= tlv_to_bgp_encap_type_l2tpv3overip (stlv
, &tto
->bgpinfo
.l2tpv3_ip
);
194 case BGP_ENCAP_TYPE_GRE
:
195 rc
= tlv_to_bgp_encap_type_gre (stlv
, &tto
->bgpinfo
.gre
);
198 case BGP_ENCAP_TYPE_TRANSMIT_TUNNEL_ENDPOINT
:
199 rc
= tlv_to_bgp_encap_type_transmit_tunnel_endpoint (stlv
,
200 &tto
->bgpinfo
.transmit_tunnel_endpoint
);
203 case BGP_ENCAP_TYPE_IPSEC_IN_TUNNEL_MODE
:
204 rc
= tlv_to_bgp_encap_type_ipsec_in_tunnel_mode (stlv
,
205 &tto
->bgpinfo
.ipsec_tunnel
);
208 case BGP_ENCAP_TYPE_IP_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
210 tlv_to_bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode (stlv
,
211 &tto
->bgpinfo
.ip_ipsec
);
214 case BGP_ENCAP_TYPE_MPLS_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
216 tlv_to_bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode
217 (stlv
, &tto
->bgpinfo
.mpls_ipsec
);
220 case BGP_ENCAP_TYPE_IP_IN_IP
:
221 rc
= tlv_to_bgp_encap_type_ip_in_ip (stlv
, &tto
->bgpinfo
.ip_ip
);
224 case BGP_ENCAP_TYPE_VXLAN
:
225 rc
= tlv_to_bgp_encap_type_vxlan (stlv
, &tto
->bgpinfo
.vxlan
);
228 case BGP_ENCAP_TYPE_NVGRE
:
229 rc
= tlv_to_bgp_encap_type_nvgre (stlv
, &tto
->bgpinfo
.nvgre
);
232 case BGP_ENCAP_TYPE_MPLS
:
233 rc
= tlv_to_bgp_encap_type_mpls (stlv
, &tto
->bgpinfo
.mpls
);
236 case BGP_ENCAP_TYPE_MPLS_IN_GRE
:
237 rc
= tlv_to_bgp_encap_type_mpls_in_gre (stlv
, &tto
->bgpinfo
.mpls_gre
);
240 case BGP_ENCAP_TYPE_VXLAN_GPE
:
241 rc
= tlv_to_bgp_encap_type_vxlan_gpe (stlv
, &tto
->bgpinfo
.vxlan_gpe
);
244 case BGP_ENCAP_TYPE_MPLS_IN_UDP
:
245 rc
= tlv_to_bgp_encap_type_mpls_in_udp (stlv
, &tto
->bgpinfo
.mpls_udp
);
248 case BGP_ENCAP_TYPE_PBB
:
249 rc
= tlv_to_bgp_encap_type_pbb (stlv
, &tto
->bgpinfo
.pbb
);
253 vnc_zlog_debug_verbose ("%s: unknown tunnel type %d",
254 __func__
, attre
->encap_tunneltype
);
260 XFREE (MTYPE_RFAPI_UN_OPTION
, uo
);
266 /***********************************************************************
268 ***********************************************************************/
271 subtlv_print_encap_l2tpv3_over_ip (
274 struct bgp_tea_subtlv_encap_l2tpv3_over_ip
*st
)
276 int (*fp
) (void *, const char *, ...);
279 const char *vty_newline
;
281 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
286 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(L2TPv3 over IP)",
288 fp (out
, "%*s SessionID: %d%s", column_offset
, "", st
->sessionid
,
290 fp (out
, "%*s Cookie: (length %d)%s", column_offset
, "", st
->cookie_length
,
295 subtlv_print_encap_gre (
298 struct bgp_tea_subtlv_encap_gre_key
*st
)
300 int (*fp
) (void *, const char *, ...);
303 const char *vty_newline
;
305 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
310 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(GRE)", vty_newline
);
311 fp (out
, "%*s GRE key: %d (0x%x)%s", column_offset
, "", st
->gre_key
,
312 st
->gre_key
, vty_newline
);
316 subtlv_print_encap_pbb (
319 struct bgp_tea_subtlv_encap_pbb
*st
)
321 int (*fp
) (void *, const char *, ...);
324 const char *vty_newline
;
326 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
331 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(PBB)", vty_newline
);
334 fp (out
, "%*s ISID: %d (0x%x)%s", column_offset
, "", st
->isid
,
335 st
->isid
, vty_newline
);
339 fp (out
, "%*s VID: %d (0x%x)%s", column_offset
, "", st
->vid
, st
->vid
,
342 fp (out
, "%*s MACADDR %02x:%02x:%02x:%02x:%02x:%02x%s",
347 st
->macaddr
[3], st
->macaddr
[4], st
->macaddr
[5], vty_newline
);
351 subtlv_print_proto_type (
354 struct bgp_tea_subtlv_proto_type
*st
)
356 int (*fp
) (void *, const char *, ...);
359 const char *vty_newline
;
361 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
366 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Encap(Proto Type)",
368 fp (out
, "%*s Proto %d (0x%x)%s", column_offset
, "", st
->proto
, st
->proto
,
376 struct bgp_tea_subtlv_color
*st
)
378 int (*fp
) (void *, const char *, ...);
381 const char *vty_newline
;
383 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
388 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: Color", vty_newline
);
389 fp (out
, "%*s Color: %d (0x%x)", column_offset
, "", st
->color
, st
->color
,
394 subtlv_print_ipsec_ta (
397 struct bgp_tea_subtlv_ipsec_ta
*st
)
399 int (*fp
) (void *, const char *, ...);
402 const char *vty_newline
;
404 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
409 fp (out
, "%*s%s%s", column_offset
, "", "SubTLV: IPSEC TA", vty_newline
);
410 fp (out
, "%*s Authenticator Type: %d (0x%x)", column_offset
, "",
411 st
->authenticator_type
, st
->authenticator_type
, vty_newline
);
412 fp (out
, "%*s Authenticator: (length %d)", column_offset
, "",
413 st
->authenticator_length
, vty_newline
);
416 /***********************************************************************
418 ***********************************************************************/
421 print_encap_type_l2tpv3overip (
424 struct bgp_encap_type_l2tpv3_over_ip
*bet
)
426 const char *type
= "L2TPv3 over IP";
427 int (*fp
) (void *, const char *, ...);
430 const char *vty_newline
;
432 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
437 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
439 subtlv_print_encap_l2tpv3_over_ip (stream
, column_offset
+ 2,
441 subtlv_print_proto_type (stream
, column_offset
+ 2, &bet
->st_proto
);
442 subtlv_print_color (stream
, column_offset
+ 2, &bet
->st_color
);
446 print_encap_type_gre (
449 struct bgp_encap_type_gre
*bet
)
451 const char *type
= "GRE";
452 int (*fp
) (void *, const char *, ...);
455 const char *vty_newline
;
457 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
462 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
464 subtlv_print_encap_gre (stream
, column_offset
+ 2, &bet
->st_encap
);
465 subtlv_print_proto_type (stream
, column_offset
+ 2, &bet
->st_proto
);
466 subtlv_print_color (stream
, column_offset
+ 2, &bet
->st_color
);
470 print_encap_type_ip_in_ip (
473 struct bgp_encap_type_ip_in_ip
*bet
)
475 const char *type
= "IP in IP";
476 int (*fp
) (void *, const char *, ...);
479 const char *vty_newline
;
481 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
486 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
488 subtlv_print_proto_type (stream
, column_offset
+ 2, &bet
->st_proto
);
489 subtlv_print_color (stream
, column_offset
+ 2, &bet
->st_color
);
493 print_encap_type_transmit_tunnel_endpoint (
496 struct bgp_encap_type_transmit_tunnel_endpoint
*bet
)
498 const char *type
= "Transmit Tunnel Endpoint";
499 int (*fp
) (void *, const char *, ...);
502 const char *vty_newline
;
504 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
509 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
511 /* no subtlvs for this type */
515 print_encap_type_ipsec_in_tunnel_mode (
518 struct bgp_encap_type_ipsec_in_tunnel_mode
*bet
)
520 const char *type
= "IPSEC in Tunnel mode";
521 int (*fp
) (void *, const char *, ...);
524 const char *vty_newline
;
526 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
531 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
532 subtlv_print_ipsec_ta (stream
, column_offset
+ 2, &bet
->st_ipsec_ta
);
536 print_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode (
539 struct bgp_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode
*bet
)
541 const char *type
= "IP in IP Tunnel with IPSEC transport mode";
542 int (*fp
) (void *, const char *, ...);
545 const char *vty_newline
;
547 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
552 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
554 subtlv_print_ipsec_ta (stream
, column_offset
+ 2, &bet
->st_ipsec_ta
);
558 print_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode (
561 struct bgp_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode
*bet
)
563 const char *type
= "MPLS in IP Tunnel with IPSEC transport mode";
564 int (*fp
) (void *, const char *, ...);
567 const char *vty_newline
;
569 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
574 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
576 subtlv_print_ipsec_ta (stream
, column_offset
+ 2, &bet
->st_ipsec_ta
);
581 print_encap_type_pbb (
584 struct bgp_encap_type_pbb
*bet
)
586 const char *type
= "PBB";
587 int (*fp
) (void *, const char *, ...);
590 const char *vty_newline
;
592 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
597 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
599 subtlv_print_encap_pbb (stream
, column_offset
+ 2, &bet
->st_encap
);
604 print_encap_type_vxlan (
607 struct bgp_encap_type_vxlan
*bet
)
609 const char *type
= "VXLAN";
610 int (*fp
) (void *, const char *, ...);
613 const char *vty_newline
;
615 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
620 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
622 /* no subtlvs for this type */
627 print_encap_type_nvgre (
630 struct bgp_encap_type_nvgre
*bet
)
632 const char *type
= "NVGRE";
633 int (*fp
) (void *, const char *, ...);
636 const char *vty_newline
;
638 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
643 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
645 /* no subtlvs for this type */
649 print_encap_type_mpls (
652 struct bgp_encap_type_mpls
*bet
)
654 const char *type
= "MPLS";
655 int (*fp
) (void *, const char *, ...);
658 const char *vty_newline
;
660 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
665 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
667 /* no subtlvs for this type */
671 print_encap_type_mpls_in_gre (
674 struct bgp_encap_type_mpls_in_gre
*bet
)
676 const char *type
= "MPLS in GRE";
677 int (*fp
) (void *, const char *, ...);
680 const char *vty_newline
;
682 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
687 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
689 /* no subtlvs for this type */
693 print_encap_type_vxlan_gpe (
696 struct bgp_encap_type_vxlan_gpe
*bet
)
698 const char *type
= "VXLAN GPE";
699 int (*fp
) (void *, const char *, ...);
702 const char *vty_newline
;
704 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
709 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
711 /* no subtlvs for this type */
715 print_encap_type_mpls_in_udp (
718 struct bgp_encap_type_mpls_in_udp
*bet
)
720 const char *type
= "MPLS in UDP";
721 int (*fp
) (void *, const char *, ...);
724 const char *vty_newline
;
726 if (rfapiStream2Vty (stream
, &fp
, &vty
, &out
, &vty_newline
) == 0)
731 fp (out
, "%*sTEA type %s%s", column_offset
, "", type
, vty_newline
);
733 /* no subtlvs for this type */
737 rfapi_print_tunneltype_option (
740 struct rfapi_tunneltype_option
*tto
)
744 case BGP_ENCAP_TYPE_L2TPV3_OVER_IP
:
745 print_encap_type_l2tpv3overip (stream
, column_offset
,
746 &tto
->bgpinfo
.l2tpv3_ip
);
749 case BGP_ENCAP_TYPE_GRE
:
750 print_encap_type_gre (stream
, column_offset
, &tto
->bgpinfo
.gre
);
753 case BGP_ENCAP_TYPE_TRANSMIT_TUNNEL_ENDPOINT
:
754 print_encap_type_transmit_tunnel_endpoint (stream
, column_offset
,
755 &tto
->bgpinfo
.transmit_tunnel_endpoint
);
758 case BGP_ENCAP_TYPE_IPSEC_IN_TUNNEL_MODE
:
759 print_encap_type_ipsec_in_tunnel_mode (stream
, column_offset
,
760 &tto
->bgpinfo
.ipsec_tunnel
);
763 case BGP_ENCAP_TYPE_IP_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
764 print_encap_type_ip_in_ip_tunnel_with_ipsec_transport_mode (stream
,
766 &tto
->bgpinfo
.ip_ipsec
);
769 case BGP_ENCAP_TYPE_MPLS_IN_IP_TUNNEL_WITH_IPSEC_TRANSPORT_MODE
:
770 print_encap_type_mpls_in_ip_tunnel_with_ipsec_transport_mode (stream
,
772 &tto
->bgpinfo
.mpls_ipsec
);
775 case BGP_ENCAP_TYPE_IP_IN_IP
:
776 print_encap_type_ip_in_ip (stream
, column_offset
, &tto
->bgpinfo
.ip_ip
);
779 case BGP_ENCAP_TYPE_VXLAN
:
780 print_encap_type_vxlan (stream
, column_offset
, &tto
->bgpinfo
.vxlan
);
783 case BGP_ENCAP_TYPE_NVGRE
:
784 print_encap_type_nvgre (stream
, column_offset
, &tto
->bgpinfo
.nvgre
);
787 case BGP_ENCAP_TYPE_MPLS
:
788 print_encap_type_mpls (stream
, column_offset
, &tto
->bgpinfo
.mpls
);
791 case BGP_ENCAP_TYPE_MPLS_IN_GRE
:
792 print_encap_type_mpls_in_gre (stream
, column_offset
,
793 &tto
->bgpinfo
.mpls_gre
);
796 case BGP_ENCAP_TYPE_VXLAN_GPE
:
797 print_encap_type_vxlan_gpe (stream
, column_offset
,
798 &tto
->bgpinfo
.vxlan_gpe
);
801 case BGP_ENCAP_TYPE_MPLS_IN_UDP
:
802 print_encap_type_mpls_in_udp (stream
, column_offset
,
803 &tto
->bgpinfo
.mpls_udp
);
806 case BGP_ENCAP_TYPE_PBB
:
807 print_encap_type_pbb (stream
, column_offset
, &tto
->bgpinfo
.pbb
);