Lines Matching refs:tptr

1256     const u_char *tptr = pptr;  in bgp_attr_get_as_size()  local
1271 while (tptr < pptr + len) { in bgp_attr_get_as_size()
1272 ND_TCHECK(tptr[0]); in bgp_attr_get_as_size()
1277 if (tptr[0] < BGP_AS_SEG_TYPE_MIN || tptr[0] > BGP_AS_SEG_TYPE_MAX) { in bgp_attr_get_as_size()
1280 ND_TCHECK(tptr[1]); in bgp_attr_get_as_size()
1281 tptr += 2 + tptr[1] * 2; in bgp_attr_get_as_size()
1288 if (tptr == pptr + len) { in bgp_attr_get_as_size()
1316 const u_char *tptr; in bgp_attr_print() local
1321 tptr = pptr; in bgp_attr_print()
1329 ND_TCHECK(*tptr); in bgp_attr_print()
1332 tptr[0], in bgp_attr_print()
1362 while (tptr < pptr + len) { in bgp_attr_print()
1363 ND_TCHECK(tptr[0]); in bgp_attr_print()
1365 "?", tptr[0], in bgp_attr_print()
1367 for (i = 0; i < tptr[1] * as_size; i += as_size) { in bgp_attr_print()
1368 ND_TCHECK2(tptr[2 + i], as_size); in bgp_attr_print()
1372 EXTRACT_16BITS(&tptr[2 + i]) : in bgp_attr_print()
1373 EXTRACT_32BITS(&tptr[2 + i])))); in bgp_attr_print()
1375 ND_TCHECK(tptr[0]); in bgp_attr_print()
1377 "?", tptr[0], in bgp_attr_print()
1379 ND_TCHECK(tptr[1]); in bgp_attr_print()
1380 tptr += 2 + tptr[1] * as_size; in bgp_attr_print()
1387 ND_TCHECK2(tptr[0], 4); in bgp_attr_print()
1388 ND_PRINT((ndo, "%s", getname(ndo, tptr))); in bgp_attr_print()
1396 ND_TCHECK2(tptr[0], 4); in bgp_attr_print()
1397 ND_PRINT((ndo, "%u", EXTRACT_32BITS(tptr))); in bgp_attr_print()
1414 ND_TCHECK2(tptr[0], len); in bgp_attr_print()
1417 as_printf(ndo, astostr, sizeof(astostr), EXTRACT_16BITS(tptr)), in bgp_attr_print()
1418 getname(ndo, tptr + 2))); in bgp_attr_print()
1422 EXTRACT_32BITS(tptr)), getname(ndo, tptr + 4))); in bgp_attr_print()
1430 ND_TCHECK2(tptr[0], 8); in bgp_attr_print()
1432 as_printf(ndo, astostr, sizeof(astostr), EXTRACT_32BITS(tptr)), in bgp_attr_print()
1433 getname(ndo, tptr + 4))); in bgp_attr_print()
1442 ND_TCHECK2(tptr[0], 4); in bgp_attr_print()
1443 comm = EXTRACT_32BITS(tptr); in bgp_attr_print()
1462 tptr +=4; in bgp_attr_print()
1470 ND_TCHECK2(tptr[0], 4); in bgp_attr_print()
1471 ND_PRINT((ndo, "%s",getname(ndo, tptr))); in bgp_attr_print()
1479 ND_TCHECK2(tptr[0], 4); in bgp_attr_print()
1481 getname(ndo, tptr), in bgp_attr_print()
1484 tptr +=4; in bgp_attr_print()
1488 ND_TCHECK2(tptr[0], 3); in bgp_attr_print()
1489 af = EXTRACT_16BITS(tptr); in bgp_attr_print()
1490 safi = tptr[2]; in bgp_attr_print()
1533 ND_TCHECK2(tptr[0], tlen); in bgp_attr_print()
1536 print_unknown_data(ndo, tptr, "\n\t ", tlen); in bgp_attr_print()
1541 tptr +=3; in bgp_attr_print()
1543 ND_TCHECK(tptr[0]); in bgp_attr_print()
1544 nhlen = tptr[0]; in bgp_attr_print()
1546 tptr++; in bgp_attr_print()
1567 ND_TCHECK2(tptr[0], sizeof(struct in_addr)); in bgp_attr_print()
1568 ND_PRINT((ndo, "%s",getname(ndo, tptr))); in bgp_attr_print()
1570 tptr += sizeof(struct in_addr); in bgp_attr_print()
1580 ND_TCHECK2(tptr[0], sizeof(struct in_addr)+BGP_VPN_RD_LEN); in bgp_attr_print()
1582 bgp_vpn_rd_print(ndo, tptr), in bgp_attr_print()
1583 getname(ndo, tptr+BGP_VPN_RD_LEN))); in bgp_attr_print()
1585 tptr += (sizeof(struct in_addr)+BGP_VPN_RD_LEN); in bgp_attr_print()
1597 ND_TCHECK2(tptr[0], sizeof(struct in6_addr)); in bgp_attr_print()
1598 ND_PRINT((ndo, "%s", getname6(ndo, tptr))); in bgp_attr_print()
1600 tptr += sizeof(struct in6_addr); in bgp_attr_print()
1610 ND_TCHECK2(tptr[0], sizeof(struct in6_addr)+BGP_VPN_RD_LEN); in bgp_attr_print()
1612 bgp_vpn_rd_print(ndo, tptr), in bgp_attr_print()
1613 getname6(ndo, tptr+BGP_VPN_RD_LEN))); in bgp_attr_print()
1615 tptr += (sizeof(struct in6_addr)+BGP_VPN_RD_LEN); in bgp_attr_print()
1627 ND_TCHECK2(tptr[0], sizeof(struct in_addr)); in bgp_attr_print()
1628 ND_PRINT((ndo, "%s", getname(ndo, tptr))); in bgp_attr_print()
1630 tptr += (sizeof(struct in_addr)); in bgp_attr_print()
1636 ND_TCHECK2(tptr[0], tlen); in bgp_attr_print()
1637 ND_PRINT((ndo, "%s", isonsap_string(tptr, tlen))); in bgp_attr_print()
1638 tptr += tlen; in bgp_attr_print()
1649 ND_TCHECK2(tptr[0], tlen); in bgp_attr_print()
1651 bgp_vpn_rd_print(ndo, tptr), in bgp_attr_print()
1652 isonsap_string(tptr+BGP_VPN_RD_LEN,tlen-BGP_VPN_RD_LEN))); in bgp_attr_print()
1654 if (EXTRACT_32BITS(tptr+BGP_VPN_RD_LEN) == 0x47000601) in bgp_attr_print()
1655 ND_PRINT((ndo, " = %s", getname(ndo, tptr+BGP_VPN_RD_LEN+4))); in bgp_attr_print()
1658 else if (EXTRACT_24BITS(tptr+BGP_VPN_RD_LEN) == 0x350000) in bgp_attr_print()
1659 ND_PRINT((ndo, " = %s", getname6(ndo, tptr+BGP_VPN_RD_LEN+3))); in bgp_attr_print()
1661 tptr += tlen; in bgp_attr_print()
1666 ND_TCHECK2(tptr[0], tlen); in bgp_attr_print()
1669 print_unknown_data(ndo, tptr, "\n\t ", tlen); in bgp_attr_print()
1670 tptr += tlen; in bgp_attr_print()
1678 tptr += tlen; in bgp_attr_print()
1680 ND_TCHECK(tptr[0]); in bgp_attr_print()
1681 snpa = tptr[0]; in bgp_attr_print()
1682 tptr++; in bgp_attr_print()
1687 ND_TCHECK(tptr[0]); in bgp_attr_print()
1688 ND_PRINT((ndo, "\n\t %d bytes", tptr[0])); in bgp_attr_print()
1689 tptr += tptr[0] + 1; in bgp_attr_print()
1695 while (len - (tptr - pptr) > 0) { in bgp_attr_print()
1700 advance = decode_prefix4(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1711 advance = decode_labeled_prefix4(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1724 advance = decode_labeled_vpn_prefix4(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1733 advance = decode_rt_routing_info(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1743 advance = decode_multicast_vpn(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1753 advance = decode_mdt_vpn_nlri(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1765 advance = decode_prefix6(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1776 advance = decode_labeled_prefix6(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1789 advance = decode_labeled_vpn_prefix6(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1802 advance = decode_labeled_vpn_l2(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1813 advance = decode_clnp_prefix(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1824 advance = decode_labeled_vpn_clnp_prefix(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1833 ND_TCHECK2(*tptr,tlen); in bgp_attr_print()
1836 print_unknown_data(ndo, tptr, "\n\t ", tlen); in bgp_attr_print()
1838 tptr = pptr + len; in bgp_attr_print()
1843 tptr += advance; in bgp_attr_print()
1849 ND_TCHECK2(tptr[0], BGP_MP_NLRI_MINSIZE); in bgp_attr_print()
1850 af = EXTRACT_16BITS(tptr); in bgp_attr_print()
1851 safi = tptr[2]; in bgp_attr_print()
1865 tptr += 3; in bgp_attr_print()
1867 while (len - (tptr - pptr) > 0) { in bgp_attr_print()
1872 advance = decode_prefix4(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1883 advance = decode_labeled_prefix4(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1896 advance = decode_labeled_vpn_prefix4(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1908 advance = decode_prefix6(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1919 advance = decode_labeled_prefix6(ndo, tptr, len, buf, sizeof(buf)); in bgp_attr_print()
1932 advance = decode_labeled_vpn_prefix6(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1945 advance = decode_labeled_vpn_l2(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1956 advance = decode_clnp_prefix(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1967 advance = decode_labeled_vpn_clnp_prefix(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1976 advance = decode_mdt_vpn_nlri(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1986 advance = decode_multicast_vpn(ndo, tptr, buf, sizeof(buf)); in bgp_attr_print()
1995 ND_TCHECK2(*(tptr-3),tlen); in bgp_attr_print()
1998 print_unknown_data(ndo, tptr-3, "\n\t ", tlen); in bgp_attr_print()
2000 tptr = pptr + len; in bgp_attr_print()
2005 tptr += advance; in bgp_attr_print()
2016 ND_TCHECK2(tptr[0], 2); in bgp_attr_print()
2017 extd_comm=EXTRACT_16BITS(tptr); in bgp_attr_print()
2026 ND_TCHECK2(*(tptr+2), 6); in bgp_attr_print()
2032 EXTRACT_16BITS(tptr+2), in bgp_attr_print()
2033 EXTRACT_32BITS(tptr+4), in bgp_attr_print()
2034 getname(ndo, tptr+4))); in bgp_attr_print()
2041 getname(ndo, tptr+2), in bgp_attr_print()
2042 EXTRACT_16BITS(tptr+6))); in bgp_attr_print()
2048 EXTRACT_32BITS(tptr+2)), EXTRACT_16BITS(tptr+6))); in bgp_attr_print()
2051 bw.i = EXTRACT_32BITS(tptr+2); in bgp_attr_print()
2061 ND_PRINT((ndo, "%s", getname(ndo, tptr+2))); in bgp_attr_print()
2066 getname(ndo, tptr+2), in bgp_attr_print()
2069 *(tptr+6), in bgp_attr_print()
2071 (*(tptr+7) & BGP_OSPF_RTYPE_METRIC_TYPE) ? "E2" : "", in bgp_attr_print()
2072 … ((*(tptr+6) == BGP_OSPF_RTYPE_EXT) || (*(tptr+6) == BGP_OSPF_RTYPE_NSSA)) ? "E1" : "")); in bgp_attr_print()
2078 *(tptr+2), in bgp_attr_print()
2080 *(tptr+3), in bgp_attr_print()
2081 EXTRACT_16BITS(tptr+4))); in bgp_attr_print()
2084 ND_PRINT((ndo, ": AS %u", EXTRACT_16BITS(tptr+2))); in bgp_attr_print()
2087 ND_TCHECK2(*tptr,8); in bgp_attr_print()
2088 print_unknown_data(ndo, tptr, "\n\t ", 8); in bgp_attr_print()
2092 tptr +=8; in bgp_attr_print()
2100 tunnel_type = *(tptr+1); in bgp_attr_print()
2101 flags = *tptr; in bgp_attr_print()
2104 ND_TCHECK2(tptr[0], 5); in bgp_attr_print()
2109 EXTRACT_24BITS(tptr+2)>>4)); in bgp_attr_print()
2111 tptr +=5; in bgp_attr_print()
2117 ND_TCHECK2(tptr[0], 8); in bgp_attr_print()
2119 ipaddr_string(ndo, tptr), in bgp_attr_print()
2120 ipaddr_string(ndo, tptr+4))); in bgp_attr_print()
2124 ND_TCHECK2(tptr[0], 8); in bgp_attr_print()
2126 ipaddr_string(ndo, tptr), in bgp_attr_print()
2127 ipaddr_string(ndo, tptr+4))); in bgp_attr_print()
2130 ND_TCHECK2(tptr[0], 4); in bgp_attr_print()
2132 ipaddr_string(ndo, tptr))); in bgp_attr_print()
2136 ND_TCHECK2(tptr[0], 8); in bgp_attr_print()
2138 ipaddr_string(ndo, tptr), in bgp_attr_print()
2139 EXTRACT_32BITS(tptr+4))); in bgp_attr_print()
2142 ND_TCHECK2(tptr[0], 8); in bgp_attr_print()
2144 ipaddr_string(ndo, tptr), in bgp_attr_print()
2145 EXTRACT_32BITS(tptr+4))); in bgp_attr_print()
2149 print_unknown_data(ndo, tptr, "\n\t ", tlen); in bgp_attr_print()
2155 ND_TCHECK2(tptr[0], 4); in bgp_attr_print()
2159 as_printf(ndo, astostr, sizeof(astostr), EXTRACT_32BITS(tptr)))); in bgp_attr_print()
2160 tptr+=4; in bgp_attr_print()
2166 ND_TCHECK2(tptr[0], 2); in bgp_attr_print()
2169 aflags = *tptr; in bgp_attr_print()
2170 atype = *(tptr + 1); in bgp_attr_print()
2171 tptr += 2; in bgp_attr_print()
2173 alenlen = bgp_attr_lenlen(aflags, tptr); in bgp_attr_print()
2174 ND_TCHECK2(tptr[0], alenlen); in bgp_attr_print()
2177 alen = bgp_attr_len(aflags, tptr); in bgp_attr_print()
2178 tptr += alenlen; in bgp_attr_print()
2199 if (!bgp_attr_print(ndo, atype, tptr, alen)) in bgp_attr_print()
2201 tptr += alen; in bgp_attr_print()
2549 const u_char *tptr; in bgp_notification_print() local
2600 tptr = dat + BGP_NOTIFICATION_SIZE; in bgp_notification_print()
2601 ND_TCHECK2(*tptr, 7); in bgp_notification_print()
2604 EXTRACT_16BITS(tptr), tokbuf, sizeof(tokbuf)), in bgp_notification_print()
2605 EXTRACT_16BITS(tptr), in bgp_notification_print()
2606 tok2strbuf(bgp_safi_values, "Unknown", *(tptr+2), in bgp_notification_print()
2608 *(tptr+2), in bgp_notification_print()
2609 EXTRACT_32BITS(tptr+3))); in bgp_notification_print()