Lines Matching refs:mdata
341 gbuf_t *mdata, *mchain;
344 for (i = 0, j = 0, mdata = m, mchain = m; mdata; i++) {
345 mdata = gbuf_cont(mdata);
346 if (!mdata && mchain) {
347 mdata = gbuf_next(mchain);
348 mchain = mdata;
373 gbuf_t *mioc, *mdata;
500 if ((mdata = gbuf_cont(mioc)) == 0) {
504 addr = (at_inet_t *)gbuf_rptr(mdata);
552 asp_accept(server_scb, scb, mdata);
556 if ((mdata = gbuf_cont(mioc)) == 0) {
561 status_cmd = (asp_status_cmd_t *)gbuf_rptr(mdata);
570 gbuf_freeb(mdata);
574 if ((mdata = gbuf_cont(mioc)) == 0) {
579 open_cmd = (asp_open_cmd_t *)gbuf_rptr(mdata);
593 gbuf_freeb(mdata);
692 gbuf_t *mdata;
713 mdata = gbuf_cont(mioc);
719 atpBDS = (struct atpBDS *)gbuf_rptr(mdata);
720 gbuf_wset(mdata,atpBDSsize);
725 sd = (struct atp_set_default *)gbuf_wptr(mdata);
726 gbuf_winc(mdata,sizeof(struct atp_set_default));
731 ddp = (at_ddp_t *)gbuf_wptr(mdata);
738 atp = ATP_ATP_HDR(gbuf_wptr(mdata));
742 gbuf_winc(mdata,TOTAL_ATP_HDR_SIZE);
744 iocbp->ioc_count = gbuf_len(mdata);
834 gbuf_t *mdata;
840 mdata = scb->sess_ioc;
841 ddp = (at_ddp_t *)gbuf_rptr(mdata);
842 atp = (at_atp_t *)(gbuf_rptr(mdata) + DDP_X_HDR_SIZE);
865 scb->sess_ioc = gbuf_next(mdata);
866 gbuf_next(mdata) = 0;
868 atp_send_rsp(scb->gref, mdata, TRUE);
922 register gbuf_t *mdata, *m, *mx;
955 if ((mdata = gbuf_cont(mioc)) == 0) {
961 ddp = (at_ddp_t *)gbuf_rptr(mdata);
962 gbuf_rinc(mdata,DDP_X_HDR_SIZE);
963 atp = (at_atp_t *)gbuf_rptr(mdata);
964 gbuf_rinc(mdata,ATP_HDR_SIZE);
1001 if (gbuf_cont(mdata)) {
1002 gbuf_freem(gbuf_cont(mdata));
1003 gbuf_cont(mdata) = 0;
1005 gbuf_rdec(mdata,TOTAL_ATP_HDR_SIZE);
1007 gbuf_freem(mdata);
1011 bcopy(gbuf_rptr(mdata), gbuf_rptr(m), TOTAL_ATP_HDR_SIZE);
1012 gbuf_freeb(mdata);
1013 mdata = m;
1014 ddp = (at_ddp_t *)gbuf_rptr(mdata);
1015 gbuf_wset(mdata,DDP_X_HDR_SIZE);
1016 atp = (at_atp_t *)gbuf_wptr(mdata);
1017 gbuf_winc(mdata,ATP_HDR_SIZE);
1025 atpBDS = (struct atpBDS *)gbuf_wptr(mdata);
1035 gbuf_winc(mdata,atpBDSsize);
1036 gbuf_cont(mdata) = mx;
1037 atp_send_rsp(gref, mdata, FALSE);
1048 if (gbuf_cont(mdata)) {
1049 gbuf_freem(gbuf_cont(mdata));
1050 gbuf_cont(mdata) = 0;
1052 gbuf_rdec(mdata,TOTAL_ATP_HDR_SIZE);
1053 gbuf_wset(mdata,TOTAL_ATP_HDR_SIZE);
1070 atp_send_rsp(gref, mdata, FALSE);
1077 gbuf_next(mdata) = 0;
1079 scb->sess_ioc = mdata;
1087 gbuf_next(m) = mdata;
1106 gbuf_rdec(mdata,TOTAL_ATP_HDR_SIZE);
1107 atp_drop_req(gref, mdata);
1122 mdata = gbuf_strip(mdata);
1123 gbuf_cont(mioc) = mdata;
1152 mdata = gbuf_strip(mdata);
1153 gbuf_cont(mioc) = mdata;
1196 if (gbuf_cont(mdata)) {
1197 gbuf_freem(gbuf_cont(mdata));
1198 gbuf_cont(mdata) = 0;
1200 gbuf_rdec(mdata,TOTAL_ATP_HDR_SIZE);
1201 gbuf_wset(mdata,TOTAL_ATP_HDR_SIZE);
1217 gbuf_next(mdata) = 0;
1220 scb->sess_ioc = mdata;
1244 gbuf_rdec(mdata,2); /* attention code */
1246 mdata = gbuf_strip(mdata);
1247 gbuf_cont(mioc) = mdata;
1297 mdata = gbuf_cont(mx);
1301 iocbp->ioc_rval = mdata ? gbuf_msgsize(mdata) : 0;
1304 atalk_putnext(gref, mdata);
1353 mdata = gbuf_cont(mx);
1354 gbuf_cont(mioc) = mdata;
1847 gbuf_t *mioc, *mdata, *mx;
1959 if (!(mdata = gbuf_alloc_wait((remain + offset > MCLBYTES ? MCLBYTES : remain + offset), TRUE))) {
1965 gbuf_wset(mdata, 0); /* init length to zero */
1966 gbuf_cont(mioc) = mdata;
1975 bcopy (dataptr, (gbuf_rptr(mdata) + offset), copy_len);
1976 else if ((err = copyin(CAST_USER_ADDR_T(dataptr), (caddr_t)(gbuf_rptr(mdata) + offset), copy_len)) != 0) {
1980 gbuf_wset(mdata, (copy_len + offset));
1986 if ((gbuf_cont(mdata) = m_get((M_WAIT), MSG_DATA)) == 0) {
1991 mdata = gbuf_cont(mdata);
1992 MCLGET(mdata, M_WAIT);
1993 if (!(mdata->m_flags & M_EXT)) {
2000 mdata = gbuf_cont(mioc); /* code further on down expects this to b e set */
2001 mdata->m_pkthdr.len = size; /* set packet hdr len */
2015 wptr = (unsigned char *)gbuf_rptr(mdata);
2045 iocbp->ioc_count = gbuf_len(mdata);
2068 gbuf_wdec(mdata,2);
2069 awp->param2 = htons(*(unsigned short *)gbuf_wptr(mdata));
2123 msize = mdata ? gbuf_msgsize(mdata) : 0;
2138 (mdata ? gbuf_msgsize(mdata) : 0), result, tid));
2157 gbuf_t *mproto, *mdata;
2197 mdata = gbuf_cont(mproto);
2221 if ((datbuf.maxlen < 0) || (datbuf.maxlen < gbuf_msgsize(mdata))) {
2260 for (rval = 0, sum = 0; mdata && (rval == 0); mdata = gbuf_cont(mdata))
2262 len = gbuf_len(mdata);
2271 if ((err = copyout((caddr_t)gbuf_rptr(mdata), CAST_USER_ADDR_T(&datbuf.buf[sum]), len)) != 0)
2291 mdata = gbuf_cont(mproto);
2292 *mreply = mdata;