--- print-bgp.c 2016-10-12 21:27:08.000000000 +0200 +++ print-bgp-large.c 2016-10-12 21:26:01.000000000 +0200 @@ -132,6 +132,7 @@ #define BGPTYPE_AS4_PATH 17 /* RFC4893 */ #define BGPTYPE_AGGREGATOR4 18 /* RFC4893 */ #define BGPTYPE_PMSI_TUNNEL 22 /* draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt */ +#define BGPTYPE_LARGE_COMMUNITIES 30 /* draft-ietf-idr-large-community */ #define BGPTYPE_ATTR_SET 128 /* draft-marques-ppvpn-ibgp */ #define BGP_MP_NLRI_MINSIZE 3 /* End of RIB Marker detection */ @@ -157,6 +158,7 @@ { BGPTYPE_EXTD_COMMUNITIES, "Extended Community"}, { BGPTYPE_PMSI_TUNNEL, "PMSI Tunnel"}, { BGPTYPE_ATTR_SET, "Attribute Set"}, + { BGPTYPE_LARGE_COMMUNITIES, "Large Community"}, { 255, "Reserved for development"}, { 0, NULL} }; @@ -1462,6 +1464,22 @@ tptr +=4; } break; + case BGPTYPE_LARGE_COMMUNITIES: + if (len == 0 || len % 12) { + ND_PRINT((ndo, "invalid len")); + break; + } + while (tlen>0) { + ND_TCHECK2(tptr[0], 12); + ND_PRINT((ndo, "%u:%u:%u%s", + EXTRACT_32BITS(tptr), + EXTRACT_32BITS(tptr + 4), + EXTRACT_32BITS(tptr + 8), + (tlen>12) ? ", " : "")); + tlen -= 12; + tptr += 12; + } + break; case BGPTYPE_ORIGINATOR_ID: if (len != 4) { ND_PRINT((ndo, "invalid len"));