Lines Matching refs:opt
159 struct T_opthdr *opt = (struct T_opthdr *)bufp; in find_ucred_opt() local
162 syslog(LOG_INFO, "find_ucred_opt opt: %p %x, %d %d", opt, in find_ucred_opt()
163 opt->len, opt->name, opt->level); in find_ucred_opt()
165 if (opt->len > maxbufp - bufp || (opt->len & 3)) in find_ucred_opt()
167 if (opt->level == SOL_SOCKET && opt->name == SCM_UCRED && in find_ucred_opt()
168 opt->len - sizeof (struct T_opthdr) <= ucred_size()) { in find_ucred_opt()
172 (void) memcpy(uc, &opt[1], in find_ucred_opt()
173 opt->len - sizeof (struct T_opthdr)); in find_ucred_opt()
176 bufp += opt->len; in find_ucred_opt()
279 struct T_opthdr *opt, *opt_start = NULL, *opt_end; in __rpc_get_ltaddr() local
309 opt = opt_start; in __rpc_get_ltaddr()
315 if (((uchar_t *)opt + sizeof (struct T_opthdr)) > in __rpc_get_ltaddr()
320 if (opt->len < sizeof (struct T_opthdr)) { in __rpc_get_ltaddr()
324 if (((uchar_t *)opt + opt->len) > (uchar_t *)opt_end) { in __rpc_get_ltaddr()
328 switch (opt->level) { in __rpc_get_ltaddr()
330 if (opt->name == IP_RECVDSTADDR) { in __rpc_get_ltaddr()
333 opt++; in __rpc_get_ltaddr()
334 if (((uchar_t *)opt + sizeof (struct in_addr)) > in __rpc_get_ltaddr()
341 v4tmp.sin_addr = *(struct in_addr *)opt; in __rpc_get_ltaddr()
347 ia = *(struct in_addr *)opt; in __rpc_get_ltaddr()
377 ipv4sa->sin_addr = *(struct in_addr *)opt; in __rpc_get_ltaddr()
385 if (opt->name == IPV6_PKTINFO) { in __rpc_get_ltaddr()
387 opt++; in __rpc_get_ltaddr()
388 if (((uchar_t *)opt + in __rpc_get_ltaddr()
397 ((struct in6_pktinfo *)opt)->ipi6_addr; in __rpc_get_ltaddr()
403 in6_pkt = (struct in6_pktinfo *)opt; in __rpc_get_ltaddr()
434 ((struct in6_pktinfo *)opt)->ipi6_addr; in __rpc_get_ltaddr()
445 opt = (struct T_opthdr *)((uchar_t *)opt + in __rpc_get_ltaddr()
446 __TPI_ALIGN(opt->len)); in __rpc_get_ltaddr()
447 } while (opt < opt_end); in __rpc_get_ltaddr()
513 oreq.opt.len = sizeof (struct opthdr) + optsz; in __rpc_tli_set_options()
514 oreq.opt.buf = buf; in __rpc_tli_set_options()
517 ores.opt.buf = buf; in __rpc_tli_set_options()
518 ores.opt.maxlen = __TRANSPORT_INDSZ; in __rpc_tli_set_options()