Lines Matching refs:mp

76 static int tirdwrrput(queue_t *q, mblk_t *mp);
77 static int tirdwrwput(queue_t *q, mblk_t *mp);
147 static void send_fatal(queue_t *q, mblk_t *mp);
210 mblk_t *mp; in tirdwrclose() local
222 if (mp = allocb(sizeof (struct T_discon_req), BPRI_LO)) { in tirdwrclose()
223 pptr = (union T_primitives *)mp->b_rptr; in tirdwrclose()
224 mp->b_wptr = mp->b_rptr + sizeof (struct T_ordrel_req); in tirdwrclose()
226 mp->b_datap->db_type = M_PROTO; in tirdwrclose()
227 putnext(WR(q), mp); in tirdwrclose()
242 tirdwrrput(queue_t *q, mblk_t *mp) in tirdwrrput() argument
253 freemsg(mp); in tirdwrrput()
257 switch (mp->b_datap->db_type) { in tirdwrrput()
260 putnext(q, mp); in tirdwrrput()
264 putnext(q, mp); in tirdwrrput()
270 if ((mp->b_wptr - mp->b_rptr) < sizeof (t_scalar_t)) { in tirdwrrput()
272 freemsg(mp); in tirdwrrput()
275 pptr = (union T_primitives *)mp->b_rptr; in tirdwrrput()
280 send_fatal(q, mp); in tirdwrrput()
283 if (msgdsize(mp) == 0) { in tirdwrrput()
284 freemsg(mp); in tirdwrrput()
288 tmp = (mblk_t *)unlinkb(mp); in tirdwrrput()
289 freemsg(mp); in tirdwrrput()
295 mp->b_datap->db_type = M_DATA; in tirdwrrput()
296 mp->b_wptr = mp->b_rptr; in tirdwrrput()
297 putnext(q, mp); in tirdwrrput()
303 if (msgdsize(mp) != 0) { in tirdwrrput()
304 tmp = (mblk_t *)unlinkb(mp); in tirdwrrput()
307 mp->b_datap->db_type = M_HANGUP; in tirdwrrput()
308 mp->b_wptr = mp->b_rptr; in tirdwrrput()
309 putnext(q, mp); in tirdwrrput()
313 send_fatal(q, mp); in tirdwrrput()
327 tirdwrwput(queue_t *q, mblk_t *mp) in tirdwrwput() argument
336 freemsg(mp); in tirdwrwput()
340 switch (mp->b_datap->db_type) { in tirdwrwput()
342 putnext(q, mp); in tirdwrwput()
346 putnext(q, mp); in tirdwrwput()
351 send_fatal(q, mp); in tirdwrwput()
359 send_fatal(queue_t *q, mblk_t *mp) in send_fatal() argument
366 mp->b_datap->db_type = M_ERROR; in send_fatal()
367 *mp->b_datap->db_base = EPROTO; in send_fatal()
368 mp->b_rptr = mp->b_datap->db_base; in send_fatal()
369 mp->b_wptr = mp->b_datap->db_base + sizeof (char); in send_fatal()
370 freemsg(unlinkb(mp)); in send_fatal()
372 putnext(q, mp); in send_fatal()
374 qreply(q, mp); in send_fatal()
380 mblk_t *mp; in check_strhead() local
383 for (mp = q->q_next->q_first; mp != NULL; mp = mp->b_next) { in check_strhead()
385 switch (mp->b_datap->db_type) { in check_strhead()
387 pptr = (union T_primitives *)mp->b_rptr; in check_strhead()
388 if ((mp->b_wptr - mp->b_rptr) < sizeof (t_scalar_t)) in check_strhead()
395 if (mp->b_cont && in check_strhead()
396 (mp->b_cont->b_datap->db_type != M_DATA)) in check_strhead()
420 mblk_t *mp; in strip_strhead() local
427 for (mp = q->q_first; mp != NULL; ) { in strip_strhead()
429 switch (mp->b_datap->db_type) { in strip_strhead()
431 pptr = (union T_primitives *)mp->b_rptr; in strip_strhead()
435 if (msgdsize(mp) == 0) { in strip_strhead()
437 tmp = mp->b_next; in strip_strhead()
438 rmvq(q, mp); in strip_strhead()
439 freemsg(mp); in strip_strhead()
440 mp = tmp; in strip_strhead()
443 emp = mp->b_next; in strip_strhead()
444 rmvq(q, mp); in strip_strhead()
445 tmp = (mblk_t *)unlinkb(mp); in strip_strhead()
446 freeb(mp); in strip_strhead()
448 mp = emp; in strip_strhead()
454 if (msgdsize(mp) == 0) in strip_strhead()
456 mp = mp->b_next; in strip_strhead()
460 mp = mp->b_next; in strip_strhead()