Lines Matching refs:tptrp
233 * processed, the return value of the function is 0 and *tptrp points to
236 * to be processed, the return value is -1 and *tptrp is NULL. If an
237 * error occurs, the return value is -1 and *tptrp is not NULL.
241 inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp)
266 if (*tptrp == NULL)
267 *tptrp = (u_int8_t *)(ip6e + 1);
269 if ((optlen = ip6optlen(*tptrp, lim)) == 0)
272 *tptrp = *tptrp + optlen;
274 if (*tptrp >= lim) { /* there is no option */
275 *tptrp = NULL;
282 if (ip6optlen(*tptrp, lim) == 0)
293 * Note: RFC 2292 says the type of tptrp is u_int8_t *, but we think
297 inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type)
322 if (*tptrp == NULL)
323 *tptrp = (u_int8_t *)(ip6e + 1);
325 if ((optlen = ip6optlen(*tptrp, lim)) == 0)
328 *tptrp = *tptrp + optlen;
330 for (optp = *tptrp; optp < lim; optp += optlen) {
332 *tptrp = optp;
340 *tptrp = NULL;