Lines Matching refs:ndo

516 as_printf(netdissect_options *ndo,  in as_printf()  argument
519 if (!ndo->ndo_bflag || asnum <= 0xFFFF) { in as_printf()
530 decode_prefix4(netdissect_options *ndo, in decode_prefix4() argument
552 snprintf(buf, buflen, "%s/%d", ipaddr_string(ndo, &addr), plen); in decode_prefix4()
563 decode_labeled_prefix4(netdissect_options *ndo, in decode_labeled_prefix4() argument
602 ipaddr_string(ndo, &addr), in decode_labeled_prefix4()
622 bgp_vpn_ip_print(netdissect_options *ndo, in bgp_vpn_ip_print() argument
633 snprintf(pos, sizeof(addr), "%s", ipaddr_string(ndo, pptr)); in bgp_vpn_ip_print()
637 snprintf(pos, sizeof(addr), "%s", ip6addr_string(ndo, pptr)); in bgp_vpn_ip_print()
669 bgp_vpn_sg_print(netdissect_options *ndo, in bgp_vpn_sg_print() argument
687 bgp_vpn_ip_print(ndo, pptr, addr_length)); in bgp_vpn_sg_print()
701 bgp_vpn_ip_print(ndo, pptr, addr_length)); in bgp_vpn_sg_print()
713 bgp_vpn_rd_print(netdissect_options *ndo, in bgp_vpn_rd_print() argument
740 as_printf(ndo, astostr, sizeof(astostr), EXTRACT_32BITS(pptr+2)), in bgp_vpn_rd_print()
754 decode_rt_routing_info(netdissect_options *ndo, in decode_rt_routing_info() argument
780 as_printf(ndo, asbuf, sizeof(asbuf), EXTRACT_32BITS(pptr + 1)); in decode_rt_routing_info()
801 bgp_vpn_rd_print(ndo, (u_char *)&route_target)); in decode_rt_routing_info()
810 decode_labeled_vpn_prefix4(netdissect_options *ndo, in decode_labeled_vpn_prefix4() argument
836 bgp_vpn_rd_print(ndo, pptr+4), in decode_labeled_vpn_prefix4()
837 ipaddr_string(ndo, &addr), in decode_labeled_vpn_prefix4()
861 decode_mdt_vpn_nlri(netdissect_options *ndo, in decode_mdt_vpn_nlri() argument
889 bgp_vpn_rd_print(ndo, rd), ipaddr_string(ndo, vpn_ip), ipaddr_string(ndo, pptr)); in decode_mdt_vpn_nlri()
918 decode_multicast_vpn(netdissect_options *ndo, in decode_multicast_vpn() argument
938 bgp_vpn_rd_print(ndo, pptr), in decode_multicast_vpn()
939 bgp_vpn_ip_print(ndo, pptr + BGP_VPN_RD_LEN, in decode_multicast_vpn()
946 bgp_vpn_rd_print(ndo, pptr), in decode_multicast_vpn()
947 as_printf(ndo, astostr, sizeof(astostr), in decode_multicast_vpn()
955 bgp_vpn_rd_print(ndo, pptr)); in decode_multicast_vpn()
958 sg_length = bgp_vpn_sg_print(ndo, pptr, buf, buflen); in decode_multicast_vpn()
964 bgp_vpn_ip_print(ndo, pptr, addr_length << 3)); in decode_multicast_vpn()
971 bgp_vpn_rd_print(ndo, pptr)); in decode_multicast_vpn()
974 bgp_vpn_sg_print(ndo, pptr, buf, buflen); in decode_multicast_vpn()
982 bgp_vpn_rd_print(ndo, pptr), in decode_multicast_vpn()
983 as_printf(ndo, astostr, sizeof(astostr), in decode_multicast_vpn()
987 bgp_vpn_sg_print(ndo, pptr, buf, buflen); in decode_multicast_vpn()
1025 decode_labeled_vpn_l2(netdissect_options *ndo, in decode_labeled_vpn_l2() argument
1043 bgp_vpn_rd_print(ndo, pptr), in decode_labeled_vpn_l2()
1044 ipaddr_string(ndo, pptr+8) in decode_labeled_vpn_l2()
1057 bgp_vpn_rd_print(ndo, pptr), in decode_labeled_vpn_l2()
1117 decode_prefix6(netdissect_options *ndo, in decode_prefix6() argument
1139 snprintf(buf, buflen, "%s/%d", ip6addr_string(ndo, &addr), plen); in decode_prefix6()
1150 decode_labeled_prefix6(netdissect_options *ndo, in decode_labeled_prefix6() argument
1180 ip6addr_string(ndo, &addr), in decode_labeled_prefix6()
1195 decode_labeled_vpn_prefix6(netdissect_options *ndo, in decode_labeled_vpn_prefix6() argument
1221 bgp_vpn_rd_print(ndo, pptr+4), in decode_labeled_vpn_prefix6()
1222 ip6addr_string(ndo, &addr), in decode_labeled_vpn_prefix6()
1234 decode_clnp_prefix(netdissect_options *ndo, in decode_clnp_prefix() argument
1254 isonsap_string(ndo, addr,(plen + 7) / 8), in decode_clnp_prefix()
1264 decode_labeled_vpn_clnp_prefix(netdissect_options *ndo, in decode_labeled_vpn_clnp_prefix() argument
1290 bgp_vpn_rd_print(ndo, pptr+4), in decode_labeled_vpn_clnp_prefix()
1291 isonsap_string(ndo, addr,(plen + 7) / 8), in decode_labeled_vpn_clnp_prefix()
1310 bgp_attr_get_as_size(netdissect_options *ndo, in bgp_attr_get_as_size() argument
1361 bgp_attr_print(netdissect_options *ndo, in bgp_attr_print() argument
1383 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1386 ND_PRINT((ndo, "%s", tok2str(bgp_origin_values, in bgp_attr_print()
1398 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1402 ND_PRINT((ndo, "empty")); in bgp_attr_print()
1414 as_size = bgp_attr_get_as_size(ndo, atype, pptr, len); in bgp_attr_print()
1418 ND_PRINT((ndo, "%s", tok2str(bgp_as_path_segment_open_values, in bgp_attr_print()
1423 ND_PRINT((ndo, "%s ", in bgp_attr_print()
1424 as_printf(ndo, astostr, sizeof(astostr), in bgp_attr_print()
1430 ND_PRINT((ndo, "%s", tok2str(bgp_as_path_segment_close_values, in bgp_attr_print()
1438 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1441 ND_PRINT((ndo, "%s", ipaddr_string(ndo, tptr))); in bgp_attr_print()
1447 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1450 ND_PRINT((ndo, "%u", EXTRACT_32BITS(tptr))); in bgp_attr_print()
1455 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1464 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1469 ND_PRINT((ndo, " AS #%s, origin %s", in bgp_attr_print()
1470 as_printf(ndo, astostr, sizeof(astostr), EXTRACT_16BITS(tptr)), in bgp_attr_print()
1471 ipaddr_string(ndo, tptr + 2))); in bgp_attr_print()
1473 ND_PRINT((ndo, " AS #%s, origin %s", in bgp_attr_print()
1474 as_printf(ndo, astostr, sizeof(astostr), in bgp_attr_print()
1475 EXTRACT_32BITS(tptr)), ipaddr_string(ndo, tptr + 4))); in bgp_attr_print()
1480 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1484 ND_PRINT((ndo, " AS #%s, origin %s", in bgp_attr_print()
1485 as_printf(ndo, astostr, sizeof(astostr), EXTRACT_32BITS(tptr)), in bgp_attr_print()
1486 ipaddr_string(ndo, tptr + 4))); in bgp_attr_print()
1490 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1499 ND_PRINT((ndo, " NO_EXPORT")); in bgp_attr_print()
1502 ND_PRINT((ndo, " NO_ADVERTISE")); in bgp_attr_print()
1505 ND_PRINT((ndo, " NO_EXPORT_SUBCONFED")); in bgp_attr_print()
1508 ND_PRINT((ndo, "%u:%u%s", in bgp_attr_print()
1520 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1524 ND_PRINT((ndo, "%s",ipaddr_string(ndo, tptr))); in bgp_attr_print()
1528 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1533 ND_PRINT((ndo, "%s%s", in bgp_attr_print()
1534 ipaddr_string(ndo, tptr), in bgp_attr_print()
1545 ND_PRINT((ndo, "\n\t AFI: %s (%u), %sSAFI: %s (%u)", in bgp_attr_print()
1583 ND_PRINT((ndo, "\n\t no AFI %u / SAFI %u decoder", af, safi)); in bgp_attr_print()
1584 if (ndo->ndo_vflag <= 1) in bgp_attr_print()
1585 print_unknown_data(ndo, tptr, "\n\t ", tlen); in bgp_attr_print()
1599 ND_PRINT((ndo, "\n\t nexthop: ")); in bgp_attr_print()
1602 ND_PRINT((ndo, ", " )); in bgp_attr_print()
1613 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1617 ND_PRINT((ndo, "%s",ipaddr_string(ndo, tptr))); in bgp_attr_print()
1626 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1630 ND_PRINT((ndo, "RD: %s, %s", in bgp_attr_print()
1631 bgp_vpn_rd_print(ndo, tptr), in bgp_attr_print()
1632 ipaddr_string(ndo, tptr+BGP_VPN_RD_LEN))); in bgp_attr_print()
1642 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1646 ND_PRINT((ndo, "%s", ip6addr_string(ndo, tptr))); in bgp_attr_print()
1655 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1659 ND_PRINT((ndo, "RD: %s, %s", in bgp_attr_print()
1660 bgp_vpn_rd_print(ndo, tptr), in bgp_attr_print()
1661 ip6addr_string(ndo, tptr+BGP_VPN_RD_LEN))); in bgp_attr_print()
1671 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1675 ND_PRINT((ndo, "%s", ipaddr_string(ndo, tptr))); in bgp_attr_print()
1684 ND_PRINT((ndo, "%s", isonsap_string(ndo, tptr, tlen))); in bgp_attr_print()
1693 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
1697 ND_PRINT((ndo, "RD: %s, %s", in bgp_attr_print()
1698 bgp_vpn_rd_print(ndo, tptr), in bgp_attr_print()
1699 … isonsap_string(ndo, tptr+BGP_VPN_RD_LEN,tlen-BGP_VPN_RD_LEN))); in bgp_attr_print()
1702 … ND_PRINT((ndo, " = %s", ipaddr_string(ndo, tptr+BGP_VPN_RD_LEN+4))); in bgp_attr_print()
1705 … ND_PRINT((ndo, " = %s", ip6addr_string(ndo, tptr+BGP_VPN_RD_LEN+3))); in bgp_attr_print()
1712 ND_PRINT((ndo, "no AFI %u/SAFI %u decoder", af, safi)); in bgp_attr_print()
1713 if (ndo->ndo_vflag <= 1) in bgp_attr_print()
1714 print_unknown_data(ndo, tptr, "\n\t ", tlen); in bgp_attr_print()
1722 ND_PRINT((ndo, ", nh-length: %u", nhlen)); in bgp_attr_print()
1730 ND_PRINT((ndo, "\n\t %u SNPA", snpa)); in bgp_attr_print()
1733 ND_PRINT((ndo, "\n\t %d bytes", tptr[0])); in bgp_attr_print()
1737 ND_PRINT((ndo, ", no SNPA")); in bgp_attr_print()
1745 advance = decode_prefix4(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1747 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1753 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1756 advance = decode_labeled_prefix4(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1758 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1764 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1769 advance = decode_labeled_vpn_prefix4(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1771 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1775 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1778 advance = decode_rt_routing_info(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1780 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1784 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1788 advance = decode_multicast_vpn(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1790 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1794 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1798 advance = decode_mdt_vpn_nlri(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1800 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1804 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1809 advance = decode_prefix6(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1811 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1817 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1820 advance = decode_labeled_prefix6(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1822 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1828 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1833 advance = decode_labeled_vpn_prefix6(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1835 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1839 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1845 advance = decode_labeled_vpn_l2(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1847 ND_PRINT((ndo, "\n\t (illegal length)")); in bgp_attr_print()
1851 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1856 advance = decode_clnp_prefix(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1858 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1862 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1867 advance = decode_labeled_vpn_clnp_prefix(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1869 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1873 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1877 ND_PRINT((ndo, "\n\t no AFI %u / SAFI %u decoder", af, safi)); in bgp_attr_print()
1878 if (ndo->ndo_vflag <= 1) in bgp_attr_print()
1879 print_unknown_data(ndo, tptr, "\n\t ", tlen); in bgp_attr_print()
1896 ND_PRINT((ndo, "\n\t AFI: %s (%u), %sSAFI: %s (%u)", in bgp_attr_print()
1904 ND_PRINT((ndo, "\n\t End-of-Rib Marker (empty NLRI)")); in bgp_attr_print()
1913 advance = decode_prefix4(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1915 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1921 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1924 advance = decode_labeled_prefix4(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1926 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1932 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1937 advance = decode_labeled_vpn_prefix4(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1939 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1943 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1948 advance = decode_prefix6(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1950 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1956 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1959 advance = decode_labeled_prefix6(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1961 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1967 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1972 advance = decode_labeled_vpn_prefix6(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1974 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
1978 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1984 advance = decode_labeled_vpn_l2(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1986 ND_PRINT((ndo, "\n\t (illegal length)")); in bgp_attr_print()
1990 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
1995 advance = decode_clnp_prefix(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1997 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
2001 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
2006 advance = decode_labeled_vpn_clnp_prefix(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
2008 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
2012 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
2015 advance = decode_mdt_vpn_nlri(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
2017 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
2021 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
2025 advance = decode_multicast_vpn(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
2027 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_attr_print()
2031 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_attr_print()
2035 ND_PRINT((ndo, "no AFI %u / SAFI %u decoder", af, safi)); in bgp_attr_print()
2036 if (ndo->ndo_vflag <= 1) in bgp_attr_print()
2037 print_unknown_data(ndo, tptr-3, "\n\t ", tlen); in bgp_attr_print()
2049 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
2058 ND_PRINT((ndo, "\n\t %s (0x%04x), Flags [%s]", in bgp_attr_print()
2070 ND_PRINT((ndo, ": %u:%u (= %s)", in bgp_attr_print()
2073 ipaddr_string(ndo, tptr+4))); in bgp_attr_print()
2079 ND_PRINT((ndo, ": %s:%u", in bgp_attr_print()
2080 ipaddr_string(ndo, tptr+2), in bgp_attr_print()
2085 ND_PRINT((ndo, ": %s:%u", in bgp_attr_print()
2086 as_printf(ndo, astostr, sizeof(astostr), in bgp_attr_print()
2091 ND_PRINT((ndo, ": bandwidth: %.3f Mbps", in bgp_attr_print()
2100 ND_PRINT((ndo, "%s", ipaddr_string(ndo, tptr+2))); in bgp_attr_print()
2104 ND_PRINT((ndo, ": area:%s, router-type:%s, metric-type:%s%s", in bgp_attr_print()
2105 ipaddr_string(ndo, tptr+2), in bgp_attr_print()
2113 ND_PRINT((ndo, ": %s Control Flags [0x%02x]:MTU %u", in bgp_attr_print()
2121 ND_PRINT((ndo, ": AS %u", EXTRACT_16BITS(tptr+2))); in bgp_attr_print()
2125 print_unknown_data(ndo, tptr, "\n\t ", 8); in bgp_attr_print()
2142 ND_PRINT((ndo, "\n\t Tunnel-type %s (%u), Flags [%s], MPLS Label %u", in bgp_attr_print()
2155 ND_PRINT((ndo, "\n\t Sender %s, P-Group %s", in bgp_attr_print()
2156 ipaddr_string(ndo, tptr), in bgp_attr_print()
2157 ipaddr_string(ndo, tptr+4))); in bgp_attr_print()
2162 ND_PRINT((ndo, "\n\t Root-Node %s, P-Group %s", in bgp_attr_print()
2163 ipaddr_string(ndo, tptr), in bgp_attr_print()
2164 ipaddr_string(ndo, tptr+4))); in bgp_attr_print()
2168 ND_PRINT((ndo, "\n\t Tunnel-Endpoint %s", in bgp_attr_print()
2169 ipaddr_string(ndo, tptr))); in bgp_attr_print()
2174 ND_PRINT((ndo, "\n\t Root-Node %s, LSP-ID 0x%08x", in bgp_attr_print()
2175 ipaddr_string(ndo, tptr), in bgp_attr_print()
2180 ND_PRINT((ndo, "\n\t Extended-Tunnel-ID %s, P2MP-ID 0x%08x", in bgp_attr_print()
2181 ipaddr_string(ndo, tptr), in bgp_attr_print()
2185 if (ndo->ndo_vflag <= 1) { in bgp_attr_print()
2186 print_unknown_data(ndo, tptr, "\n\t ", tlen); in bgp_attr_print()
2207 ND_PRINT((ndo, "\n\t %s TLV (%u), length %u", in bgp_attr_print()
2225 ND_PRINT((ndo, ", metric %" PRIu64, in bgp_attr_print()
2230 if (ndo->ndo_vflag <= 1) { in bgp_attr_print()
2231 print_unknown_data(ndo, tptr,"\n\t ", length); in bgp_attr_print()
2244 ND_PRINT((ndo, "\n\t Origin AS: %s", in bgp_attr_print()
2245 as_printf(ndo, astostr, sizeof(astostr), EXTRACT_32BITS(tptr)))); in bgp_attr_print()
2267 ND_PRINT((ndo, "\n\t %s (%u), length: %u", in bgp_attr_print()
2274 ND_PRINT((ndo, ", Flags [%s%s%s%s", in bgp_attr_print()
2280 ND_PRINT((ndo, "+%x", aflags & 0xf)); in bgp_attr_print()
2281 ND_PRINT((ndo, "]: ")); in bgp_attr_print()
2284 if (!bgp_attr_print(ndo, atype, tptr, alen)) in bgp_attr_print()
2293 ND_PRINT((ndo, "invalid len")); in bgp_attr_print()
2296 ND_PRINT((ndo, "\n\t ")); in bgp_attr_print()
2299 ND_PRINT((ndo, "%u:%u:%u%s", in bgp_attr_print()
2310 …ND_PRINT((ndo, "\n\t no Attribute %u decoder", atype)); /* we have no decoder for the attribute… in bgp_attr_print()
2311 if (ndo->ndo_vflag <= 1) in bgp_attr_print()
2312 print_unknown_data(ndo, pptr, "\n\t ", len); in bgp_attr_print()
2315 if (ndo->ndo_vflag > 1 && len) { /* omit zero length attributes*/ in bgp_attr_print()
2317 print_unknown_data(ndo, pptr, "\n\t ", len); in bgp_attr_print()
2326 bgp_capabilities_print(netdissect_options *ndo, in bgp_capabilities_print() argument
2337 ND_PRINT((ndo, "\n\t %s (%u), length: %u", in bgp_capabilities_print()
2345 ND_PRINT((ndo, "\n\t\tAFI %s (%u), SAFI %s (%u)", in bgp_capabilities_print()
2354 ND_PRINT((ndo, "\n\t\tRestart Flags: [%s], Restart Time %us", in bgp_capabilities_print()
2360 … ND_PRINT((ndo, "\n\t\t AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s", in bgp_capabilities_print()
2381 ND_PRINT((ndo, "\n\t\t 4 Byte AS %s", in bgp_capabilities_print()
2382 as_printf(ndo, astostr, sizeof(astostr), in bgp_capabilities_print()
2389 ND_PRINT((ndo, " (bogus)")); /* length */ in bgp_capabilities_print()
2394 ND_PRINT((ndo, "\n\t\t(invalid)")); in bgp_capabilities_print()
2397 ND_PRINT((ndo, "\n\t\tAFI %s (%u), SAFI %s (%u), Send/Receive: %s", in bgp_capabilities_print()
2409 ND_PRINT((ndo, "\n\t\tno decoder for Capability %u", in bgp_capabilities_print()
2411 if (ndo->ndo_vflag <= 1) in bgp_capabilities_print()
2412 print_unknown_data(ndo, &opt[i+2], "\n\t\t", cap_len); in bgp_capabilities_print()
2415 if (ndo->ndo_vflag > 1 && cap_len > 0) { in bgp_capabilities_print()
2416 print_unknown_data(ndo, &opt[i+2], "\n\t\t", cap_len); in bgp_capabilities_print()
2423 ND_PRINT((ndo, "[|BGP]")); in bgp_capabilities_print()
2427 bgp_open_print(netdissect_options *ndo, in bgp_open_print() argument
2438 ND_PRINT((ndo, "\n\t Version %d, ", bgpo.bgpo_version)); in bgp_open_print()
2439 ND_PRINT((ndo, "my AS %s, ", in bgp_open_print()
2440 as_printf(ndo, astostr, sizeof(astostr), ntohs(bgpo.bgpo_myas)))); in bgp_open_print()
2441 ND_PRINT((ndo, "Holdtime %us, ", ntohs(bgpo.bgpo_holdtime))); in bgp_open_print()
2442 ND_PRINT((ndo, "ID %s", ipaddr_string(ndo, &bgpo.bgpo_id))); in bgp_open_print()
2443 ND_PRINT((ndo, "\n\t Optional parameters, length: %u", bgpo.bgpo_optlen)); in bgp_open_print()
2458 ND_PRINT((ndo, "\n\t Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len)); in bgp_open_print()
2462 ND_PRINT((ndo, "\n\t Option %s (%u), length: %u", in bgp_open_print()
2472 bgp_capabilities_print(ndo, &opt[i+BGP_OPT_SIZE], in bgp_open_print()
2478 ND_PRINT((ndo, "\n\t no decoder for option %u", in bgp_open_print()
2486 ND_PRINT((ndo, "[|BGP]")); in bgp_open_print()
2490 bgp_update_print(netdissect_options *ndo, in bgp_update_print() argument
2522 ND_PRINT((ndo, "\n\t Withdrawn routes: %d bytes", withdrawn_routes_len)); in bgp_update_print()
2536 ND_PRINT((ndo, "\n\t End-of-Rib Marker (empty NLRI)")); in bgp_update_print()
2566 ND_PRINT((ndo, "\n\t %s (%u), length: %u", in bgp_update_print()
2573 ND_PRINT((ndo, ", Flags [%s%s%s%s", in bgp_update_print()
2579 ND_PRINT((ndo, "+%x", aflags & 0xf)); in bgp_update_print()
2580 ND_PRINT((ndo, "]: ")); in bgp_update_print()
2586 if (!bgp_attr_print(ndo, atype, p, alen)) in bgp_update_print()
2603 ND_PRINT((ndo, "\n\t Updated routes:")); in bgp_update_print()
2606 i = decode_prefix4(ndo, p, length, buf, sizeof(buf)); in bgp_update_print()
2608 ND_PRINT((ndo, "\n\t (illegal prefix length)")); in bgp_update_print()
2615 ND_PRINT((ndo, "\n\t %s", buf)); in bgp_update_print()
2623 ND_PRINT((ndo, "[|BGP]")); in bgp_update_print()
2627 bgp_notification_print(netdissect_options *ndo, in bgp_notification_print() argument
2640 ND_PRINT((ndo, ", %s (%u)", in bgp_notification_print()
2648 ND_PRINT((ndo, ", subcode %s (%u)", in bgp_notification_print()
2654 ND_PRINT((ndo, ", subcode %s (%u)", in bgp_notification_print()
2660 ND_PRINT((ndo, ", subcode %s (%u)", in bgp_notification_print()
2666 ND_PRINT((ndo, " subcode %s (%u)", in bgp_notification_print()
2672 ND_PRINT((ndo, " subcode %s (%u)", in bgp_notification_print()
2678 ND_PRINT((ndo, ", subcode %s (%u)", in bgp_notification_print()
2689 ND_PRINT((ndo, ", AFI %s (%u), SAFI %s (%u), Max Prefixes: %u", in bgp_notification_print()
2704 ND_PRINT((ndo, "[|BGP]")); in bgp_notification_print()
2708 bgp_route_refresh_print(netdissect_options *ndo, in bgp_route_refresh_print() argument
2721 ND_PRINT((ndo, "\n\t AFI %s (%u), SAFI %s (%u)", in bgp_route_refresh_print()
2731 if (ndo->ndo_vflag > 1) { in bgp_route_refresh_print()
2733 print_unknown_data(ndo, pptr, "\n\t ", len); in bgp_route_refresh_print()
2738 ND_PRINT((ndo, "[|BGP]")); in bgp_route_refresh_print()
2742 bgp_header_print(netdissect_options *ndo, in bgp_header_print() argument
2749 ND_PRINT((ndo, "\n\t%s Message (%u), length: %u", in bgp_header_print()
2756 bgp_open_print(ndo, dat, length); in bgp_header_print()
2759 bgp_update_print(ndo, dat, length); in bgp_header_print()
2762 bgp_notification_print(ndo, dat, length); in bgp_header_print()
2767 bgp_route_refresh_print(ndo, dat, length); in bgp_header_print()
2772 ND_PRINT((ndo, "\n\t no Message %u decoder", bgp.bgp_type)); in bgp_header_print()
2773 print_unknown_data(ndo, dat, "\n\t ", length); in bgp_header_print()
2778 ND_PRINT((ndo, "[|BGP]")); in bgp_header_print()
2783 bgp_print(netdissect_options *ndo, in bgp_print() argument
2797 if (ndo->ndo_snapend < dat + length) in bgp_print()
2798 ep = ndo->ndo_snapend; in bgp_print()
2800 ND_PRINT((ndo, ": BGP")); in bgp_print()
2802 if (ndo->ndo_vflag < 1) /* lets be less chatty */ in bgp_print()
2827 ND_PRINT((ndo, " [|BGP]")); in bgp_print()
2831 ND_PRINT((ndo, "\n[|BGP Bogus header length %u < %u]", hlen, in bgp_print()
2837 if (!bgp_header_print(ndo, p, hlen)) in bgp_print()
2842 ND_PRINT((ndo, "\n[|BGP %s]", in bgp_print()
2853 ND_PRINT((ndo, " [|BGP]")); in bgp_print()