Lines Matching defs:opt
157 struct T_opthdr *opt = (struct T_opthdr *)bufp;
160 syslog(LOG_INFO, "find_ucred_opt opt: %p %x, %d %d", opt,
161 opt->len, opt->name, opt->level);
163 if (opt->len > maxbufp - bufp || (opt->len & 3))
165 if (opt->level == SOL_SOCKET && opt->name == SCM_UCRED &&
166 opt->len - sizeof (struct T_opthdr) <= ucred_size()) {
170 (void) memcpy(uc, &opt[1],
171 opt->len - sizeof (struct T_opthdr));
174 bufp += opt->len;
277 struct T_opthdr *opt, *opt_start = NULL, *opt_end;
306 opt = opt_start;
312 if (((uchar_t *)opt + sizeof (struct T_opthdr)) >
317 if (opt->len < sizeof (struct T_opthdr)) {
321 if (((uchar_t *)opt + opt->len) > (uchar_t *)opt_end) {
325 switch (opt->level) {
327 if (opt->name == IP_RECVDSTADDR) {
330 opt++;
331 if (((uchar_t *)opt + sizeof (struct in_addr)) >
338 v4tmp.sin_addr = *(struct in_addr *)opt;
344 ia = *(struct in_addr *)opt;
373 ipv4sa->sin_addr = *(struct in_addr *)opt;
381 if (opt->name == IPV6_PKTINFO) {
383 opt++;
384 if (((uchar_t *)opt +
393 ((struct in6_pktinfo *)opt)->ipi6_addr;
399 in6_pkt = (struct in6_pktinfo *)opt;
429 ((struct in6_pktinfo *)opt)->ipi6_addr;
440 opt = (struct T_opthdr *)((uchar_t *)opt +
441 __TPI_ALIGN(opt->len));
442 } while (opt < opt_end);
508 oreq.opt.len = sizeof (struct opthdr) + optsz;
509 oreq.opt.buf = buf;
512 ores.opt.buf = buf;
513 ores.opt.maxlen = __TRANSPORT_INDSZ;