Lines Matching defs:pfxlen
627 extract_prefix(const u_char *p, int len, void *va, uint8_t pfxlen, uint8_t max)
632 plen = PREFIX_SIZE(pfxlen) - 1;
636 while (pfxlen > 0) {
637 if (pfxlen < 8) {
638 *a++ = *p++ & addrmask[pfxlen];
642 pfxlen -= 8;
649 extract_prefix_buf(struct ibuf *buf, void *va, uint8_t pfxlen, uint8_t max)
655 plen = PREFIX_SIZE(pfxlen) - 1;
659 while (pfxlen > 0) {
663 if (pfxlen < 8) {
664 *a++ = tmp & addrmask[pfxlen];
668 pfxlen -= 8;
677 uint8_t pfxlen;
679 if (ibuf_get_n8(buf, &pfxlen) == -1)
681 if (pfxlen > 32)
687 if (extract_prefix_buf(buf, &prefix->v4, pfxlen,
691 *prefixlen = pfxlen;
698 uint8_t pfxlen;
700 if (ibuf_get_n8(buf, &pfxlen) == -1)
702 if (pfxlen > 128)
708 if (extract_prefix_buf(buf, &prefix->v6, pfxlen,
712 *prefixlen = pfxlen;
721 uint8_t pfxlen;
723 if (ibuf_get_n8(buf, &pfxlen) == -1)
732 pfxlen < 3 * 8)
738 pfxlen -= 3 * 8;
748 pfxlen -= 3 * 8;
752 if (pfxlen < sizeof(uint64_t) * 8 ||
755 pfxlen -= sizeof(uint64_t) * 8;
758 if (pfxlen > 32)
760 if (extract_prefix_buf(buf, &prefix->v4, pfxlen,
764 *prefixlen = pfxlen;
773 uint8_t pfxlen;
775 if (ibuf_get_n8(buf, &pfxlen) == -1)
784 pfxlen < 3 * 8)
790 pfxlen -= 3 * 8;
801 pfxlen -= 3 * 8;
805 if (pfxlen < sizeof(uint64_t) * 8 ||
808 pfxlen -= sizeof(uint64_t) * 8;
811 if (pfxlen > 128)
813 if (extract_prefix_buf(buf, &prefix->v6, pfxlen,
817 *prefixlen = pfxlen;