Lines Matching refs:mioc

373 	gbuf_t *mioc, *mdata;
397 mioc = m;
398 iocbp = (ioc_t *)gbuf_rptr(mioc);
418 asp_send_req(gref, mioc, &scb->rem_addr, &Retry, &aw,
427 asp_iocnak(gref, mioc, err);
441 asp_iocnak(gref, mioc, EINVAL);
458 asp_iocnak(gref, mioc, err);
470 asp_iocnak(gref, mioc, EINVAL);
479 if (gbuf_cont(mioc))
480 *(at_inet_t *)gbuf_rptr(gbuf_cont(mioc)) = scb->loc_addr;
484 if ((gbuf_cont(mioc) == 0) || (scb->atp_state == 0)) {
485 asp_iocnak(gref, mioc, EPROTOTYPE);
488 *(at_inet_t *)gbuf_rptr(gbuf_cont(mioc)) = scb->loc_addr;
492 if ((gbuf_cont(mioc) == 0) || (scb->atp_state == 0)) {
493 asp_iocnak(gref, mioc, EPROTOTYPE);
496 *(at_inet_t *)gbuf_rptr(gbuf_cont(mioc)) = scb->rem_addr;
500 if ((mdata = gbuf_cont(mioc)) == 0) {
501 asp_iocnak(gref, mioc, EPROTOTYPE);
510 asp_iocnak(gref, mioc, EPROTOTYPE);
514 asp_iocnak(gref, mioc, EPROTOTYPE);
523 asp_iocnak(gref, mioc, err);
551 gbuf_cont(mioc) = 0;
556 if ((mdata = gbuf_cont(mioc)) == 0) {
557 asp_iocnak(gref, mioc, EINVAL);
560 gbuf_cont(mioc) = 0;
568 asp_send_req(gref, mioc, &status_cmd->SLSEntityIdentifier,
574 if ((mdata = gbuf_cont(mioc)) == 0) {
575 asp_iocnak(gref, mioc, EINVAL);
578 gbuf_cont(mioc) = 0;
591 asp_send_req(gref, mioc, &open_cmd->SLSEntityIdentifier,
602 scb->stat_msg = gbuf_cont(mioc);
603 gbuf_cont(mioc) = 0;
612 if (gbuf_cont(mioc) == 0) {
613 asp_iocnak(gref, mioc, EINVAL);
616 scb->pid = *(int *)gbuf_rptr(gbuf_cont(mioc));
620 if (gbuf_cont(mioc) == 0) {
621 asp_iocnak(gref, mioc, EINVAL);
624 *(gref_t **)gbuf_rptr(gbuf_cont(mioc)) = gref;
628 if (gbuf_cont(mioc) == 0) {
629 asp_iocnak(gref, mioc, EINVAL);
635 *(int *)gbuf_rptr(gbuf_cont(mioc)) = 0;
637 *(int *)gbuf_rptr(gbuf_cont(mioc)) = 1;
639 *(int *)gbuf_rptr(gbuf_cont(mioc)) = -1;
648 if (gbuf_cont(mioc) == 0) {
649 asp_iocnak(gref, mioc, EINVAL);
658 (ddp_addr_t *)gbuf_rptr(gbuf_cont(mioc));
664 gbuf_wset(gbuf_cont(mioc), sizeof(at_inet_t));
669 asp_iocnak(gref, mioc, EINVAL);
673 asp_iocack(gref, mioc);
681 asp_send_req(gref, mioc, dest, retry, awp, xo, state, bitmap)
683 gbuf_t *mioc;
703 if ((gbuf_cont(mioc) = gbuf_alloc(aspCMDsize, PRI_MED)) == 0) {
705 gbuf_freem(mioc);
707 asp_iocnak(gref, mioc, ENOBUFS);
713 mdata = gbuf_cont(mioc);
714 iocbp = (ioc_t *)gbuf_rptr(mioc);
757 atp_send_req(gref, mioc);
781 gbuf_t *mioc;
794 if ((mioc = gbuf_alloc(sizeof(ioc_t), PRI_HI)) == 0) {
801 gbuf_wset(mioc,sizeof(ioc_t));
802 gbuf_set_type(mioc, MSG_IOCTL);
812 ((ioc_t *)gbuf_rptr(mioc))->ioc_cr = (void *)scb;
813 ((ioc_t *)gbuf_rptr(mioc))->ioc_cmd = AT_ATP_ISSUE_REQUEST_TICKLE;
815 if (asp_send_req(scb->gref, mioc, dest, &retry, &aw, 0, scb->state, 0)) {
917 asp_ack_reply(gref, mioc)
919 register gbuf_t *mioc;
933 iocbp = (ioc_t *)gbuf_rptr(mioc);
941 gbuf_freem(mioc);
947 gbuf_freem(mioc);
955 if ((mdata = gbuf_cont(mioc)) == 0) {
956 gbuf_freeb(mioc);
960 gbuf_set_type(mioc, MSG_IOCTL);
975 gbuf_freem(mioc);
996 gbuf_freeb(mioc);
1046 gbuf_freeb(mioc);
1105 gbuf_cont(mioc) = 0;
1114 gbuf_set_type(mioc, MSG_PROTO);
1115 gbuf_wset(mioc,sizeof(asp_command_ind_t));
1116 command_ind = (asp_command_ind_t *)gbuf_rptr(mioc);
1123 gbuf_cont(mioc) = mdata;
1128 gbuf_next(mx) = mioc;
1130 scb->req_msgq = mioc;
1133 asp_putnext(scb->gref, mioc);
1144 gbuf_set_type(mioc, MSG_PROTO);
1145 gbuf_wset(mioc,sizeof(asp_command_ind_t));
1146 command_ind = (asp_command_ind_t *)gbuf_rptr(mioc);
1153 gbuf_cont(mioc) = mdata;
1154 asp_putnext(scb->gref, mioc);
1190 gbuf_freeb(mioc);
1235 gbuf_set_type(mioc, MSG_PROTO);
1236 gbuf_wset(mioc,sizeof(asp_command_ind_t));
1237 command_ind = (asp_command_ind_t *)gbuf_rptr(mioc);
1247 gbuf_cont(mioc) = mdata;
1248 asp_putnext(scb->gref, mioc);
1269 gbuf_freem(mioc);
1285 gbuf_freem(mioc);
1295 mx = gbuf_cont(mioc);
1296 gbuf_cont(mioc) = 0;
1303 atalk_putnext(gref, mioc);
1310 mx = gbuf_cont(mioc);
1311 gbuf_cont(mioc) = 0;
1323 asp_iocnak(gref, mioc, ECONNREFUSED);
1332 atalk_putnext(gref, mioc);
1351 gbuf_set_type(mioc, MSG_PROTO);
1352 mx = gbuf_cont(mioc);
1354 gbuf_cont(mioc) = mdata;
1356 cmdreply_ind = (asp_cmdreply_ind_t *)gbuf_rptr(mioc);
1359 gbuf_wset(mioc,sizeof(asp_cmdreply_ind_t));
1361 asp_putnext(scb->gref, mioc);
1370 if (gbuf_cont(mioc)) {
1371 gbuf_freem(gbuf_cont(mioc));
1372 gbuf_cont(mioc) = 0;
1374 atalk_putnext(scb->gref, mioc);
1396 gbuf_freem(mioc);
1408 if (mioc != 0)
1409 gbuf_freem(mioc);
1420 asp_nak_reply(gref, mioc)
1422 register gbuf_t *mioc;
1427 iocbp = (ioc_t *)gbuf_rptr(mioc);
1434 gbuf_freem(mioc);
1449 gbuf_freem(mioc);
1462 gbuf_freem(mioc);
1489 gbuf_set_type(mioc, MSG_ERROR);
1490 *gbuf_rptr(mioc) = (u_char)EPROTOTYPE;
1491 gbuf_wset(mioc, 1);
1492 if (gbuf_cont(mioc)) {
1493 gbuf_freem(gbuf_cont(mioc));
1494 gbuf_cont(mioc) = 0;
1497 asp_putnext(scb->gref, mioc);
1507 if (gbuf_cont(mioc)) {
1508 gbuf_freem(gbuf_cont(mioc));
1509 gbuf_cont(mioc) = 0;
1511 gbuf_set_type(mioc, MSG_IOCACK);
1512 atalk_putnext(scb->gref, mioc);
1516 gbuf_freem(mioc);
1520 atalk_putnext(gref, mioc);
1532 gbuf_freem(mioc);
1543 gbuf_freem(mioc);
1713 asp_iocack(gref, mioc)
1715 gbuf_t *mioc;
1717 if (gbuf_cont(mioc))
1718 ((ioc_t *)gbuf_rptr(mioc))->ioc_count = gbuf_msgsize(gbuf_cont(mioc));
1720 ((ioc_t *)gbuf_rptr(mioc))->ioc_count = 0;
1722 gbuf_set_type(mioc, MSG_IOCACK);
1723 atalk_putnext(gref, mioc);
1727 asp_iocnak(gref, mioc, err)
1729 gbuf_t *mioc;
1732 ((ioc_t *)gbuf_rptr(mioc))->ioc_count = 0;
1735 ((ioc_t *)gbuf_rptr(mioc))->ioc_error = err;
1736 ((ioc_t *)gbuf_rptr(mioc))->ioc_rval = -1;
1737 if (gbuf_cont(mioc)) {
1738 gbuf_freem(gbuf_cont(mioc));
1739 gbuf_cont(mioc) = 0;
1742 gbuf_set_type(mioc, MSG_IOCNAK);
1743 atalk_putnext(gref, mioc);
1847 gbuf_t *mioc, *mdata, *mx;
1910 if (!(mioc = gbuf_alloc_wait(ctlbuf.len, TRUE))) {
1915 gbuf_set_type(mioc, MSG_IOCTL); /* for later, in ATP */
1916 gbuf_wset(mioc, ctlbuf.len);
1920 bcopy (ctlbuf.buf, gbuf_rptr(mioc), ctlbuf.len);
1923 if ((err = copyin(CAST_USER_ADDR_T(ctlbuf.buf), (caddr_t)gbuf_rptr(mioc), ctlbuf.len)) != 0) {
1924 gbuf_freem(mioc);
1929 iocbp = (ioc_t *)gbuf_rptr(mioc);
1930 primitives = (union asp_primitives *)gbuf_rptr(mioc);
1962 gbuf_freem(mioc);
1966 gbuf_cont(mioc) = mdata;
1977 gbuf_freem(mioc);
1988 gbuf_freem(mioc);
1995 gbuf_freem(mioc);
2000 mdata = gbuf_cont(mioc); /* code further on down expects this to b e set */
2079 atp_send_req(gref, mioc);
2095 /* Re-use the original mioc mbuf to send the response. */
2096 gbuf_rinc(mioc,sizeof(void *));
2097 gbuf_wset(mioc,0);
2098 ddp = (at_ddp_t *)gbuf_wptr(mioc);
2099 gbuf_winc(mioc,DDP_X_HDR_SIZE);
2100 atp = (at_atp_t *)gbuf_wptr(mioc);
2101 gbuf_winc(mioc,ATP_HDR_SIZE);
2122 atpBDS = (struct atpBDS *)gbuf_wptr(mioc);
2134 gbuf_winc(mioc,atpBDSsize);
2139 atp_send_rsp(gref, mioc, TRUE);
2144 gbuf_freem(mioc);