Lines Matching refs:optp
301 u_int8_t *optp, *lim; in inet6_option_find() local
330 for (optp = *tptrp; optp < lim; optp += optlen) { in inet6_option_find()
331 if (*optp == type) { in inet6_option_find()
332 *tptrp = optp; in inet6_option_find()
335 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_option_find()
445 u_int8_t *optp = (u_int8_t *)extbuf + offset; in inet6_opt_append() local
449 *optp = IP6OPT_PAD1; in inet6_opt_append()
450 optp++; in inet6_opt_append()
454 *optp++ = IP6OPT_PADN; in inet6_opt_append()
455 *optp++ = padlen - 2; in inet6_opt_append()
456 memset(optp, 0, padlen - 2); in inet6_opt_append()
457 optp += (padlen - 2); in inet6_opt_append()
460 *optp++ = type; in inet6_opt_append()
461 *optp++ = len; in inet6_opt_append()
463 *databufp = optp; in inet6_opt_append()
506 u_int8_t *optp, *lim; in inet6_opt_next() local
520 optp = (u_int8_t *)((struct ip6_hbh *)extbuf + 1); in inet6_opt_next()
523 optp = (u_int8_t *)extbuf + offset; in inet6_opt_next()
526 while(optp < lim) { in inet6_opt_next()
527 switch(*optp) { in inet6_opt_next()
529 optp++; in inet6_opt_next()
532 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
534 optp += optlen; in inet6_opt_next()
537 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
539 *typep = *optp; in inet6_opt_next()
541 *databufp = optp + 2; in inet6_opt_next()
542 return(optp + optlen - (u_int8_t *)extbuf); in inet6_opt_next()
555 u_int8_t *optp, *lim; in inet6_opt_find() local
569 optp = (u_int8_t *)((struct ip6_hbh *)extbuf + 1); in inet6_opt_find()
572 optp = (u_int8_t *)extbuf + offset; in inet6_opt_find()
575 while(optp < lim) { in inet6_opt_find()
576 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_find()
579 if (*optp == type) { /* found */ in inet6_opt_find()
581 *databufp = optp + 2; in inet6_opt_find()
582 return(optp + optlen - (u_int8_t *)extbuf); in inet6_opt_find()
585 optp += optlen; in inet6_opt_find()