Lines Matching refs:optp

287           u_int8_t *optp, *lim;  in inet6_option_find()  local
316 for (optp = *tptrp; optp < lim; optp += optlen) { in inet6_option_find()
317 if (*optp == type) { in inet6_option_find()
318 *tptrp = optp; in inet6_option_find()
321 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_option_find()
431 u_int8_t *optp = (u_int8_t *)extbuf + offset; in inet6_opt_append() local
435 *optp = IP6OPT_PAD1; in inet6_opt_append()
436 optp++; in inet6_opt_append()
439 *optp++ = IP6OPT_PADN; in inet6_opt_append()
440 *optp++ = padlen - 2; in inet6_opt_append()
441 memset(optp, 0, padlen - 2); in inet6_opt_append()
442 optp += (padlen - 2); in inet6_opt_append()
445 *optp++ = type; in inet6_opt_append()
446 *optp++ = len; in inet6_opt_append()
448 *databufp = optp; in inet6_opt_append()
491 u_int8_t *optp, *lim; in inet6_opt_next() local
505 optp = (u_int8_t *)((struct ip6_hbh *)extbuf + 1); in inet6_opt_next()
507 optp = (u_int8_t *)extbuf + offset; in inet6_opt_next()
510 while (optp < lim) { in inet6_opt_next()
511 switch (*optp) { in inet6_opt_next()
513 optp++; in inet6_opt_next()
516 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
518 optp += optlen; in inet6_opt_next()
521 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
523 *typep = *optp; in inet6_opt_next()
525 *databufp = optp + 2; in inet6_opt_next()
526 return(optp + optlen - (u_int8_t *)extbuf); in inet6_opt_next()
539 u_int8_t *optp, *lim; in inet6_opt_find() local
553 optp = (u_int8_t *)((struct ip6_hbh *)extbuf + 1); in inet6_opt_find()
555 optp = (u_int8_t *)extbuf + offset; in inet6_opt_find()
558 while (optp < lim) { in inet6_opt_find()
559 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_find()
562 if (*optp == type) { /* found */ in inet6_opt_find()
564 *databufp = optp + 2; in inet6_opt_find()
565 return(optp + optlen - (u_int8_t *)extbuf); in inet6_opt_find()
568 optp += optlen; in inet6_opt_find()