Lines Matching defs:ioc

158 show_ioc(str, ioc)
160 struct svr4_strioctl *ioc;
166 len = ioc->len;
172 if ((error = copyin(ioc->buf, ptr, len)) != 0) {
179 str, ioc->cmd, ioc->timeout, ioc->len, ioc->buf);
423 si_ogetudata(fp, fd, ioc, td)
426 struct svr4_strioctl *ioc;
433 if (ioc->len != sizeof(ud) && ioc->len != sizeof(ud) - sizeof(int)) {
435 sizeof(ud), ioc->len));
439 if ((error = copyin(ioc->buf, &ud, sizeof(ud))) != 0)
475 return copyout(&ud, ioc->buf, ioc->len);
480 si_sockparams(fp, fd, ioc, td)
483 struct svr4_strioctl *ioc;
489 return copyout(&pa, ioc->buf, sizeof(pa));
494 si_listen(fp, fd, ioc, td)
497 struct svr4_strioctl *ioc;
508 if (ioc->len < 0 || ioc->len > sizeof(lst))
511 if ((error = copyin(ioc->buf, &lst, ioc->len)) != 0)
553 if ((error = copyout(&lst, ioc->buf, ioc->len)) != 0)
561 si_getudata(fp, fd, ioc, td)
564 struct svr4_strioctl *ioc;
570 if (sizeof(ud) != ioc->len) {
572 sizeof(ud), ioc->len));
576 if ((error = copyin(ioc->buf, &ud, sizeof(ud))) != 0)
615 return copyout(&ud, ioc->buf, sizeof(ud));
620 si_shutdown(fp, fd, ioc, td)
623 struct svr4_strioctl *ioc;
629 if (ioc->len != sizeof(ap.how)) {
631 sizeof(ap.how), ioc->len));
635 if ((error = copyin(ioc->buf, &ap.how, ioc->len)) != 0)
645 sockmod(fp, fd, ioc, td)
648 struct svr4_strioctl *ioc;
651 switch (ioc->cmd) {
654 return si_ogetudata(fp, fd, ioc, td);
658 return si_shutdown(fp, fd, ioc, td);
662 return si_listen(fp, fd, ioc, td);
686 return si_sockparams(fp, fd, ioc, td);
690 return si_getudata(fp, fd, ioc, td);
693 DPRINTF(("Unknown sockmod ioctl %lx\n", ioc->cmd));
701 ti_getinfo(fp, fd, ioc, td)
704 struct svr4_strioctl *ioc;
712 if (ioc->len < 0 || ioc->len > sizeof(info))
715 if ((error = copyin(ioc->buf, &info, ioc->len)) != 0)
733 ioc->len = sizeof(info);
734 if ((error = copyout(&info, ioc->buf, ioc->len)) != 0)
742 ti_bind(fp, fd, ioc, td)
745 struct svr4_strioctl *ioc;
761 if (ioc->len < 0 || ioc->len > sizeof(bnd))
764 if ((error = copyin(ioc->buf, &bnd, ioc->len)) != 0)
829 if ((error = copyout(&bnd, ioc->buf, ioc->len)) != 0)
837 timod(fp, fd, ioc, td)
840 struct svr4_strioctl *ioc;
843 switch (ioc->cmd) {
846 return ti_getinfo(fp, fd, ioc, td);
854 return ti_bind(fp, fd, ioc, td);
861 DPRINTF(("Unknown timod ioctl %lx\n", ioc->cmd));
1135 struct svr4_strioctl ioc;
1137 if ((error = copyin(dat, &ioc, sizeof(ioc))) != 0)
1141 if ((error = show_ioc(">", &ioc)) != 0)
1145 switch (ioc.cmd & 0xff00) {
1147 if ((error = sockmod(fp, fd, &ioc, td)) != 0)
1152 if ((error = timod(fp, fd, &ioc, td)) != 0)
1163 if ((error = show_ioc("<", &ioc)) != 0)
1166 return copyout(&ioc, dat, sizeof(ioc));