Lines Matching refs:optp

341 	uint8_t *optp, *lim;  in inet6_option_find()  local
373 for (optp = *tptrp; optp < lim; optp += optlen) { in inet6_option_find()
374 if (*optp == type) { in inet6_option_find()
375 *tptrp = optp; in inet6_option_find()
378 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_option_find()
497 uint8_t *optp = (uint8_t *)extbuf + offset; in inet6_opt_append() local
501 *optp = IP6OPT_PAD1; in inet6_opt_append()
502 optp++; in inet6_opt_append()
505 *optp++ = IP6OPT_PADN; in inet6_opt_append()
507 *optp++ = (uint8_t)(padlen - 2); in inet6_opt_append()
508 memset(optp, 0, padlen - 2); in inet6_opt_append()
509 optp += (padlen - 2); in inet6_opt_append()
512 *optp++ = type; in inet6_opt_append()
513 *optp++ = len; in inet6_opt_append()
515 *databufp = optp; in inet6_opt_append()
558 uint8_t *optp, *lim; in inet6_opt_next() local
572 optp = (uint8_t *)(void *)((struct ip6_hbh *)extbuf + 1); in inet6_opt_next()
574 optp = (uint8_t *)extbuf + offset; in inet6_opt_next()
577 while (optp < lim) { in inet6_opt_next()
579 switch(*optp) { in inet6_opt_next()
581 optp++; in inet6_opt_next()
584 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
586 optp += optlen; in inet6_opt_next()
589 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_next()
591 *typep = *optp; in inet6_opt_next()
593 *databufp = optp + 2; in inet6_opt_next()
594 rv = optp + optlen - (uint8_t *)extbuf; in inet6_opt_next()
609 uint8_t *optp, *lim; in inet6_opt_find() local
623 optp = (uint8_t *)(void *)((struct ip6_hbh *)extbuf + 1); in inet6_opt_find()
625 optp = (uint8_t *)extbuf + offset; in inet6_opt_find()
628 while (optp < lim) { in inet6_opt_find()
629 if ((optlen = ip6optlen(optp, lim)) == 0) in inet6_opt_find()
632 if (*optp == type) { /* found */ in inet6_opt_find()
635 *databufp = optp + 2; in inet6_opt_find()
636 td = optp + optlen - (uint8_t *)extbuf; in inet6_opt_find()
641 optp += optlen; in inet6_opt_find()