Lines Matching refs:pptr

485                const u_char *pptr, u_int itemlen, char *buf, u_int buflen)  in decode_prefix4()  argument
490 ND_TCHECK(pptr[0]); in decode_prefix4()
492 plen = pptr[0]; in decode_prefix4()
499 ND_TCHECK2(pptr[1], plenbytes); in decode_prefix4()
501 memcpy(&addr, &pptr[1], plenbytes); in decode_prefix4()
518 const u_char *pptr, u_int itemlen, char *buf, u_int buflen) in decode_labeled_prefix4() argument
524 ND_TCHECK2(pptr[0], 4); in decode_labeled_prefix4()
526 plen = pptr[0]; /* get prefix length */ in decode_labeled_prefix4()
547 ND_TCHECK2(pptr[4], plenbytes); in decode_labeled_prefix4()
549 memcpy(&addr, &pptr[4], plenbytes); in decode_labeled_prefix4()
558 EXTRACT_24BITS(pptr+1)>>4, in decode_labeled_prefix4()
559 ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); in decode_labeled_prefix4()
577 const u_char *pptr, u_int addr_length) in bgp_vpn_ip_print() argument
586 ND_TCHECK2(pptr[0], sizeof(struct in_addr)); in bgp_vpn_ip_print()
587 snprintf(pos, sizeof(addr), "%s", ipaddr_string(ndo, pptr)); in bgp_vpn_ip_print()
591 ND_TCHECK2(pptr[0], sizeof(struct in6_addr)); in bgp_vpn_ip_print()
592 snprintf(pos, sizeof(addr), "%s", ip6addr_string(ndo, pptr)); in bgp_vpn_ip_print()
626 const u_char *pptr, char *buf, u_int buflen) in bgp_vpn_sg_print() argument
634 ND_TCHECK2(pptr[0], 1); in bgp_vpn_sg_print()
635 addr_length = *pptr++; in bgp_vpn_sg_print()
638 ND_TCHECK2(pptr[0], (addr_length >> 3)); in bgp_vpn_sg_print()
643 bgp_vpn_ip_print(ndo, pptr, addr_length)); in bgp_vpn_sg_print()
644 pptr += (addr_length >> 3); in bgp_vpn_sg_print()
648 ND_TCHECK2(pptr[0], 1); in bgp_vpn_sg_print()
649 addr_length = *pptr++; in bgp_vpn_sg_print()
652 ND_TCHECK2(pptr[0], (addr_length >> 3)); in bgp_vpn_sg_print()
657 bgp_vpn_ip_print(ndo, pptr, addr_length)); in bgp_vpn_sg_print()
658 pptr += (addr_length >> 3); in bgp_vpn_sg_print()
671 const u_char *pptr) in bgp_vpn_rd_print() argument
678 switch (EXTRACT_16BITS(pptr)) { in bgp_vpn_rd_print()
683 EXTRACT_16BITS(pptr+2), in bgp_vpn_rd_print()
684 EXTRACT_32BITS(pptr+4), in bgp_vpn_rd_print()
685 *(pptr+4), *(pptr+5), *(pptr+6), *(pptr+7)); in bgp_vpn_rd_print()
691 *(pptr+2), *(pptr+3), *(pptr+4), *(pptr+5), EXTRACT_16BITS(pptr+6)); in bgp_vpn_rd_print()
697 as_printf(ndo, astostr, sizeof(astostr), EXTRACT_32BITS(pptr+2)), in bgp_vpn_rd_print()
698 EXTRACT_16BITS(pptr+6), *(pptr+2), *(pptr+3), *(pptr+4), in bgp_vpn_rd_print()
699 *(pptr+5), EXTRACT_16BITS(pptr+6)); in bgp_vpn_rd_print()
712 const u_char *pptr, char *buf, u_int buflen) in decode_rt_routing_info() argument
717 ND_TCHECK(pptr[0]); in decode_rt_routing_info()
718 plen = pptr[0]; /* get prefix length */ in decode_rt_routing_info()
734 ND_TCHECK2(pptr[1], (plen + 7) / 8); in decode_rt_routing_info()
735 memcpy(&route_target, &pptr[1], (plen + 7) / 8); in decode_rt_routing_info()
741 as_printf(ndo, astostr, sizeof(astostr), EXTRACT_32BITS(pptr+1)), in decode_rt_routing_info()
752 const u_char *pptr, char *buf, u_int buflen) in decode_labeled_vpn_prefix4() argument
757 ND_TCHECK(pptr[0]); in decode_labeled_vpn_prefix4()
758 plen = pptr[0]; /* get prefix length */ in decode_labeled_vpn_prefix4()
769 ND_TCHECK2(pptr[12], (plen + 7) / 8); in decode_labeled_vpn_prefix4()
770 memcpy(&addr, &pptr[12], (plen + 7) / 8); in decode_labeled_vpn_prefix4()
777 bgp_vpn_rd_print(ndo, pptr+4), in decode_labeled_vpn_prefix4()
780 EXTRACT_24BITS(pptr+1)>>4, in decode_labeled_vpn_prefix4()
781 ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); in decode_labeled_vpn_prefix4()
803 const u_char *pptr, char *buf, u_int buflen) in decode_mdt_vpn_nlri() argument
809 ND_TCHECK(pptr[0]); in decode_mdt_vpn_nlri()
812 if (*pptr != MDT_VPN_NLRI_LEN * 8) in decode_mdt_vpn_nlri()
814 pptr++; in decode_mdt_vpn_nlri()
817 ND_TCHECK2(pptr[0], 8); in decode_mdt_vpn_nlri()
818 rd = pptr; in decode_mdt_vpn_nlri()
819 pptr+=8; in decode_mdt_vpn_nlri()
822 ND_TCHECK2(pptr[0], sizeof(struct in_addr)); in decode_mdt_vpn_nlri()
823 vpn_ip = pptr; in decode_mdt_vpn_nlri()
824 pptr+=sizeof(struct in_addr); in decode_mdt_vpn_nlri()
827 ND_TCHECK2(pptr[0], sizeof(struct in_addr)); in decode_mdt_vpn_nlri()
830 bgp_vpn_rd_print(ndo, rd), ipaddr_string(ndo, vpn_ip), ipaddr_string(ndo, pptr)); in decode_mdt_vpn_nlri()
859 const u_char *pptr, char *buf, u_int buflen) in decode_multicast_vpn() argument
864 ND_TCHECK2(pptr[0], 2); in decode_multicast_vpn()
865 route_type = *pptr++; in decode_multicast_vpn()
866 route_length = *pptr++; in decode_multicast_vpn()
875 ND_TCHECK2(pptr[0], BGP_VPN_RD_LEN); in decode_multicast_vpn()
878 bgp_vpn_rd_print(ndo, pptr), in decode_multicast_vpn()
879 bgp_vpn_ip_print(ndo, pptr + BGP_VPN_RD_LEN, in decode_multicast_vpn()
883 ND_TCHECK2(pptr[0], BGP_VPN_RD_LEN + 4); in decode_multicast_vpn()
886 bgp_vpn_rd_print(ndo, pptr), in decode_multicast_vpn()
888 EXTRACT_32BITS(pptr + BGP_VPN_RD_LEN))); in decode_multicast_vpn()
892 ND_TCHECK2(pptr[0], BGP_VPN_RD_LEN); in decode_multicast_vpn()
895 bgp_vpn_rd_print(ndo, pptr)); in decode_multicast_vpn()
896 pptr += BGP_VPN_RD_LEN; in decode_multicast_vpn()
898 sg_length = bgp_vpn_sg_print(ndo, pptr, buf, buflen); in decode_multicast_vpn()
901 ND_TCHECK2(pptr[0], addr_length); in decode_multicast_vpn()
904 bgp_vpn_ip_print(ndo, pptr, addr_length << 3)); in decode_multicast_vpn()
908 ND_TCHECK2(pptr[0], BGP_VPN_RD_LEN); in decode_multicast_vpn()
911 bgp_vpn_rd_print(ndo, pptr)); in decode_multicast_vpn()
912 pptr += BGP_VPN_RD_LEN; in decode_multicast_vpn()
914 bgp_vpn_sg_print(ndo, pptr, buf, buflen); in decode_multicast_vpn()
919 ND_TCHECK2(pptr[0], BGP_VPN_RD_LEN); in decode_multicast_vpn()
922 bgp_vpn_rd_print(ndo, pptr), in decode_multicast_vpn()
924 EXTRACT_32BITS(pptr + BGP_VPN_RD_LEN))); in decode_multicast_vpn()
925 pptr += BGP_VPN_RD_LEN; in decode_multicast_vpn()
927 bgp_vpn_sg_print(ndo, pptr, buf, buflen); in decode_multicast_vpn()
966 const u_char *pptr, char *buf, u_int buflen) in decode_labeled_vpn_l2() argument
970 ND_TCHECK2(pptr[0], 2); in decode_labeled_vpn_l2()
971 plen=EXTRACT_16BITS(pptr); in decode_labeled_vpn_l2()
973 pptr+=2; in decode_labeled_vpn_l2()
980 ND_TCHECK2(pptr[0],12); in decode_labeled_vpn_l2()
983 bgp_vpn_rd_print(ndo, pptr), in decode_labeled_vpn_l2()
985 getname(ndo, pptr+8) in decode_labeled_vpn_l2()
988 pptr+=12; in decode_labeled_vpn_l2()
995 ND_TCHECK2(pptr[0],15); in decode_labeled_vpn_l2()
998 bgp_vpn_rd_print(ndo, pptr), in decode_labeled_vpn_l2()
999 EXTRACT_16BITS(pptr+8), in decode_labeled_vpn_l2()
1000 EXTRACT_16BITS(pptr+10), in decode_labeled_vpn_l2()
1001 EXTRACT_24BITS(pptr+12)>>4); /* the label is offsetted by 4 bits so lets shift it right */ in decode_labeled_vpn_l2()
1003 pptr+=15; in decode_labeled_vpn_l2()
1010 ND_TCHECK2(pptr[0], 3); in decode_labeled_vpn_l2()
1011 tlv_type=*pptr++; in decode_labeled_vpn_l2()
1012 tlv_len=EXTRACT_16BITS(pptr); in decode_labeled_vpn_l2()
1014 pptr+=2; in decode_labeled_vpn_l2()
1026 ND_TCHECK(pptr[0]); in decode_labeled_vpn_l2()
1028 strlen=snprintf(buf,buflen, "%02x",*pptr++); in decode_labeled_vpn_l2()
1093 const u_char *pptr, u_int itemlen, char *buf, u_int buflen) in decode_labeled_prefix6() argument
1099 ND_TCHECK2(pptr[0], 4); in decode_labeled_prefix6()
1101 plen = pptr[0]; /* get prefix length */ in decode_labeled_prefix6()
1114 ND_TCHECK2(pptr[4], plenbytes); in decode_labeled_prefix6()
1115 memcpy(&addr, &pptr[4], plenbytes); in decode_labeled_prefix6()
1124 EXTRACT_24BITS(pptr+1)>>4, in decode_labeled_prefix6()
1125 ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); in decode_labeled_prefix6()
1138 const u_char *pptr, char *buf, u_int buflen) in decode_labeled_vpn_prefix6() argument
1143 ND_TCHECK(pptr[0]); in decode_labeled_vpn_prefix6()
1144 plen = pptr[0]; /* get prefix length */ in decode_labeled_vpn_prefix6()
1155 ND_TCHECK2(pptr[12], (plen + 7) / 8); in decode_labeled_vpn_prefix6()
1156 memcpy(&addr, &pptr[12], (plen + 7) / 8); in decode_labeled_vpn_prefix6()
1163 bgp_vpn_rd_print(ndo, pptr+4), in decode_labeled_vpn_prefix6()
1166 EXTRACT_24BITS(pptr+1)>>4, in decode_labeled_vpn_prefix6()
1167 ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); in decode_labeled_vpn_prefix6()
1178 const u_char *pptr, char *buf, u_int buflen) in decode_clnp_prefix() argument
1183 ND_TCHECK(pptr[0]); in decode_clnp_prefix()
1184 plen = pptr[0]; /* get prefix length */ in decode_clnp_prefix()
1190 ND_TCHECK2(pptr[4], (plen + 7) / 8); in decode_clnp_prefix()
1191 memcpy(&addr, &pptr[4], (plen + 7) / 8); in decode_clnp_prefix()
1208 const u_char *pptr, char *buf, u_int buflen) in decode_labeled_vpn_clnp_prefix() argument
1213 ND_TCHECK(pptr[0]); in decode_labeled_vpn_clnp_prefix()
1214 plen = pptr[0]; /* get prefix length */ in decode_labeled_vpn_clnp_prefix()
1225 ND_TCHECK2(pptr[12], (plen + 7) / 8); in decode_labeled_vpn_clnp_prefix()
1226 memcpy(&addr, &pptr[12], (plen + 7) / 8); in decode_labeled_vpn_clnp_prefix()
1233 bgp_vpn_rd_print(ndo, pptr+4), in decode_labeled_vpn_clnp_prefix()
1236 EXTRACT_24BITS(pptr+1)>>4, in decode_labeled_vpn_clnp_prefix()
1237 ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); in decode_labeled_vpn_clnp_prefix()
1254 uint8_t bgpa_type, const u_char *pptr, int len) in bgp_attr_get_as_size() argument
1256 const u_char *tptr = pptr; in bgp_attr_get_as_size()
1271 while (tptr < pptr + len) { in bgp_attr_get_as_size()
1288 if (tptr == pptr + len) { in bgp_attr_get_as_size()
1305 u_int atype, const u_char *pptr, u_int len) in bgp_attr_print() argument
1321 tptr = pptr; in bgp_attr_print()
1360 as_size = bgp_attr_get_as_size(ndo, atype, pptr, len); in bgp_attr_print()
1362 while (tptr < pptr + len) { in bgp_attr_print()
1695 while (len - (tptr - pptr) > 0) { in bgp_attr_print()
1838 tptr = pptr + len; in bgp_attr_print()
1867 while (len - (tptr - pptr) > 0) { in bgp_attr_print()
2000 tptr = pptr + len; in bgp_attr_print()
2208 ND_TCHECK2(*pptr,len); in bgp_attr_print()
2211 print_unknown_data(ndo, pptr, "\n\t ", len); in bgp_attr_print()
2215 ND_TCHECK2(*pptr,len); in bgp_attr_print()
2216 print_unknown_data(ndo, pptr, "\n\t ", len); in bgp_attr_print()
2623 const u_char *pptr, int len) in bgp_route_refresh_print() argument
2629 ND_TCHECK2(pptr[0], BGP_ROUTE_REFRESH_SIZE); in bgp_route_refresh_print()
2635 bgp_route_refresh_header = (const struct bgp_route_refresh *)pptr; in bgp_route_refresh_print()
2650 ND_TCHECK2(*pptr, len); in bgp_route_refresh_print()
2651 print_unknown_data(ndo, pptr, "\n\t ", len); in bgp_route_refresh_print()