Lines Matching refs:lim
43 static int ip6optlen(u_int8_t *opt, u_int8_t *lim);
242 u_int8_t *lim; in inet6_option_next() local
262 lim = (u_int8_t *)ip6e + hdrlen; in inet6_option_next()
266 if ((optlen = ip6optlen(*tptrp, lim)) == 0) in inet6_option_next()
271 if (*tptrp >= lim) { /* there is no option */ in inet6_option_next()
279 if (ip6optlen(*tptrp, lim) == 0) in inet6_option_next()
298 u_int8_t *optp, *lim; in inet6_option_find() local
318 lim = (u_int8_t *)ip6e + hdrlen; in inet6_option_find()
322 if ((optlen = ip6optlen(*tptrp, lim)) == 0) in inet6_option_find()
327 for (optp = *tptrp; optp < lim; optp += optlen) { in inet6_option_find()
332 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_option_find()
347 ip6optlen(u_int8_t *opt, u_int8_t *lim) in ip6optlen() argument
355 if (opt + 2 > lim) in ip6optlen()
359 if (opt + optlen <= lim) in ip6optlen()
503 u_int8_t *optp, *lim; in inet6_opt_next() local
509 lim = (u_int8_t *)extbuf + extlen; in inet6_opt_next()
523 while(optp < lim) { in inet6_opt_next()
529 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
534 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
552 u_int8_t *optp, *lim; in inet6_opt_find() local
558 lim = (u_int8_t *)extbuf + extlen; in inet6_opt_find()
572 while(optp < lim) { in inet6_opt_find()
573 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_find()