Lines Matching refs:optp

298 	u_int8_t *optp, *lim;  in inet6_option_find()  local
327 for (optp = *tptrp; optp < lim; optp += optlen) { in inet6_option_find()
328 if (*optp == type) { in inet6_option_find()
329 *tptrp = optp; in inet6_option_find()
332 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_option_find()
442 u_int8_t *optp = (u_int8_t *)extbuf + offset; in inet6_opt_append() local
446 *optp = IP6OPT_PAD1; in inet6_opt_append()
447 optp++; in inet6_opt_append()
451 *optp++ = IP6OPT_PADN; in inet6_opt_append()
452 *optp++ = padlen - 2; in inet6_opt_append()
453 memset(optp, 0, padlen - 2); in inet6_opt_append()
454 optp += (padlen - 2); in inet6_opt_append()
457 *optp++ = type; in inet6_opt_append()
458 *optp++ = len; in inet6_opt_append()
460 *databufp = optp; in inet6_opt_append()
503 u_int8_t *optp, *lim; in inet6_opt_next() local
517 optp = (u_int8_t *)((struct ip6_hbh *)extbuf + 1); in inet6_opt_next()
520 optp = (u_int8_t *)extbuf + offset; in inet6_opt_next()
523 while(optp < lim) { in inet6_opt_next()
524 switch(*optp) { in inet6_opt_next()
526 optp++; in inet6_opt_next()
529 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
531 optp += optlen; in inet6_opt_next()
534 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
536 *typep = *optp; in inet6_opt_next()
538 *databufp = optp + 2; in inet6_opt_next()
539 return(optp + optlen - (u_int8_t *)extbuf); in inet6_opt_next()
552 u_int8_t *optp, *lim; in inet6_opt_find() local
566 optp = (u_int8_t *)((struct ip6_hbh *)extbuf + 1); in inet6_opt_find()
569 optp = (u_int8_t *)extbuf + offset; in inet6_opt_find()
572 while(optp < lim) { in inet6_opt_find()
573 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_find()
576 if (*optp == type) { /* found */ in inet6_opt_find()
578 *databufp = optp + 2; in inet6_opt_find()
579 return(optp + optlen - (u_int8_t *)extbuf); in inet6_opt_find()
582 optp += optlen; in inet6_opt_find()