Lines Matching refs:mp

79 static void tirdwrrput(queue_t *q, mblk_t *mp);
80 static void tirdwrwput(queue_t *q, mblk_t *mp);
150 static void send_fatal(queue_t *q, mblk_t *mp);
213 mblk_t *mp; in tirdwrclose() local
225 if (mp = allocb(sizeof (struct T_discon_req), BPRI_LO)) { in tirdwrclose()
226 pptr = (union T_primitives *)mp->b_rptr; in tirdwrclose()
227 mp->b_wptr = mp->b_rptr + sizeof (struct T_ordrel_req); in tirdwrclose()
229 mp->b_datap->db_type = M_PROTO; in tirdwrclose()
230 putnext(WR(q), mp); in tirdwrclose()
245 tirdwrrput(queue_t *q, mblk_t *mp) in tirdwrrput() argument
256 freemsg(mp); in tirdwrrput()
260 switch (mp->b_datap->db_type) { in tirdwrrput()
263 putnext(q, mp); in tirdwrrput()
267 putnext(q, mp); in tirdwrrput()
273 if ((mp->b_wptr - mp->b_rptr) < sizeof (t_scalar_t)) { in tirdwrrput()
275 freemsg(mp); in tirdwrrput()
278 pptr = (union T_primitives *)mp->b_rptr; in tirdwrrput()
283 send_fatal(q, mp); in tirdwrrput()
286 if (msgdsize(mp) == 0) { in tirdwrrput()
287 freemsg(mp); in tirdwrrput()
291 tmp = (mblk_t *)unlinkb(mp); in tirdwrrput()
292 freemsg(mp); in tirdwrrput()
298 mp->b_datap->db_type = M_DATA; in tirdwrrput()
299 mp->b_wptr = mp->b_rptr; in tirdwrrput()
300 putnext(q, mp); in tirdwrrput()
306 if (msgdsize(mp) != 0) { in tirdwrrput()
307 tmp = (mblk_t *)unlinkb(mp); in tirdwrrput()
310 mp->b_datap->db_type = M_HANGUP; in tirdwrrput()
311 mp->b_wptr = mp->b_rptr; in tirdwrrput()
312 putnext(q, mp); in tirdwrrput()
316 send_fatal(q, mp); in tirdwrrput()
329 tirdwrwput(queue_t *q, mblk_t *mp) in tirdwrwput() argument
338 freemsg(mp); in tirdwrwput()
342 switch (mp->b_datap->db_type) { in tirdwrwput()
344 putnext(q, mp); in tirdwrwput()
348 putnext(q, mp); in tirdwrwput()
353 send_fatal(q, mp); in tirdwrwput()
360 send_fatal(queue_t *q, mblk_t *mp) in send_fatal() argument
367 mp->b_datap->db_type = M_ERROR; in send_fatal()
368 *mp->b_datap->db_base = EPROTO; in send_fatal()
369 mp->b_rptr = mp->b_datap->db_base; in send_fatal()
370 mp->b_wptr = mp->b_datap->db_base + sizeof (char); in send_fatal()
371 freemsg(unlinkb(mp)); in send_fatal()
373 putnext(q, mp); in send_fatal()
375 qreply(q, mp); in send_fatal()
381 mblk_t *mp; in check_strhead() local
384 for (mp = q->q_next->q_first; mp != NULL; mp = mp->b_next) { in check_strhead()
386 switch (mp->b_datap->db_type) { in check_strhead()
388 pptr = (union T_primitives *)mp->b_rptr; in check_strhead()
389 if ((mp->b_wptr - mp->b_rptr) < sizeof (t_scalar_t)) in check_strhead()
396 if (mp->b_cont && in check_strhead()
397 (mp->b_cont->b_datap->db_type != M_DATA)) in check_strhead()
421 mblk_t *mp; in strip_strhead() local
428 for (mp = q->q_first; mp != NULL; ) { in strip_strhead()
430 switch (mp->b_datap->db_type) { in strip_strhead()
432 pptr = (union T_primitives *)mp->b_rptr; in strip_strhead()
436 if (msgdsize(mp) == 0) { in strip_strhead()
438 tmp = mp->b_next; in strip_strhead()
439 rmvq(q, mp); in strip_strhead()
440 freemsg(mp); in strip_strhead()
441 mp = tmp; in strip_strhead()
444 emp = mp->b_next; in strip_strhead()
445 rmvq(q, mp); in strip_strhead()
446 tmp = (mblk_t *)unlinkb(mp); in strip_strhead()
447 freeb(mp); in strip_strhead()
449 mp = emp; in strip_strhead()
455 if (msgdsize(mp) == 0) in strip_strhead()
457 mp = mp->b_next; in strip_strhead()
461 mp = mp->b_next; in strip_strhead()