+
+ /* now lets decode the options we know*/
+ switch(bgpopt.bgpopt_type) {
+ case BGP_OPT_CAP:
+ cap_type=opt[i+BGP_OPT_SIZE];
+ cap_len=opt[i+BGP_OPT_SIZE+1];
+ printf("\n\t %s, length %u",
+ tok2str(bgp_capcode_values,"Unknown", cap_type),
+ cap_len);
+ switch(cap_type) {
+ case BGP_CAPCODE_MP:
+ printf("\n\t\tAFI %s (%u), SAFI %s (%u)",
+ tok2str(bgp_afi_values,"Unknown", EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2)),
+ EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2),
+ tok2str(bgp_safi_values,"Unknown", opt[i+BGP_OPT_SIZE+5]),
+ opt[i+BGP_OPT_SIZE+5]);
+ break;
+ case BGP_CAPCODE_RR:
+ case BGP_CAPCODE_RR_CISCO:
+ break;
+ default:
+ printf("\n\t\tno decoder for Capability %u",
+ cap_type);
+ break;
+ }
+ break;
+ case BGP_OPT_AUTH:
+ default:
+ printf("\n\t no decoder for option %u",
+ bgpopt.bgpopt_type);
+ break;
+ }
+