- printf("\n\t\t 4 Byte AS %s",
- as_printf(astostr, sizeof(astostr),
- EXTRACT_32BITS(opt + i + 2)));
+ ND_PRINT((ndo, "\n\t\t 4 Byte AS %s",
+ as_printf(ndo, astostr, sizeof(astostr),
+ EXTRACT_32BITS(opt + i + 2))));
+ }
+ break;
+ case BGP_CAPCODE_ADD_PATH:
+ cap_offset=2;
+ if (tcap_len == 0) {
+ ND_PRINT((ndo, " (bogus)")); /* length */
+ break;
+ }
+ while (tcap_len > 0) {
+ if (tcap_len < 4) {
+ ND_PRINT((ndo, "\n\t\t(invalid)"));
+ break;
+ }
+ ND_PRINT((ndo, "\n\t\tAFI %s (%u), SAFI %s (%u), Send/Receive: %s",
+ tok2str(af_values,"Unknown",EXTRACT_16BITS(opt+i+cap_offset)),
+ EXTRACT_16BITS(opt+i+cap_offset),
+ tok2str(bgp_safi_values,"Unknown",opt[i+cap_offset+2]),
+ opt[i+cap_offset+2],
+ tok2str(bgp_add_path_recvsend,"Bogus (0x%02x)",opt[i+cap_offset+3])
+ ));
+ tcap_len-=4;
+ cap_offset+=4;