Lines Matching refs:lim
66 static int ip6optlen(uint8_t *opt, uint8_t *lim);
282 uint8_t *lim; in inet6_option_next() local
305 lim = (uint8_t *)(void *)ip6e + hdrlen; in inet6_option_next()
309 if ((optlen = ip6optlen(*tptrp, lim)) == 0) in inet6_option_next()
314 if (*tptrp >= lim) { /* there is no option */ in inet6_option_next()
322 if (ip6optlen(*tptrp, lim) == 0) in inet6_option_next()
341 uint8_t *optp, *lim; in inet6_option_find() local
364 lim = (uint8_t *)(void *)ip6e + hdrlen; in inet6_option_find()
368 if ((optlen = ip6optlen(*tptrp, lim)) == 0) in inet6_option_find()
373 for (optp = *tptrp; optp < lim; optp += optlen) { in inet6_option_find()
378 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_option_find()
393 ip6optlen(uint8_t *opt, uint8_t *lim) in ip6optlen() argument
398 _DIAGASSERT(lim != NULL); in ip6optlen()
404 if (opt + 2 > lim) in ip6optlen()
408 if (opt + optlen <= lim) in ip6optlen()
558 uint8_t *optp, *lim; in inet6_opt_next() local
564 lim = (uint8_t *)extbuf + extlen; in inet6_opt_next()
577 while (optp < lim) { in inet6_opt_next()
584 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
589 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
609 uint8_t *optp, *lim; in inet6_opt_find() local
615 lim = (uint8_t *)extbuf + extlen; in inet6_opt_find()
628 while (optp < lim) { in inet6_opt_find()
629 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_find()