+
+static void
+debug_dump(q, mp)
+ queue_t *q; /* not used */
+ mblk_t *mp; /* not used either */
+{
+ upperstr_t *us;
+ queue_t *uq, *lq;
+
+ cmn_err(CE_CONT, "ppp upper streams:\n");
+ for (us = minor_devs; us != 0; us = us->nextmn) {
+ uq = us->q;
+ cmn_err(CE_CONT, " %d: q=%x rlev=%d wlev=%d flags=0x%b",
+ us->mn, uq, (uq? qsize(uq): 0), (uq? qsize(WR(uq)): 0),
+ us->flags, "\020\1priv\2control\3blocked\4last");
+ cmn_err(CE_CONT, " state=%x sap=%x req_sap=%x", us->state, us->sap,
+ us->req_sap);
+ if (us->ppa == 0)
+ cmn_err(CE_CONT, " ppa=?\n");
+ else
+ cmn_err(CE_CONT, " ppa=%d\n", us->ppa->ppa_id);
+ if (us->flags & US_CONTROL) {
+ lq = us->lowerq;
+ cmn_err(CE_CONT, " control for %d lq=%x rlev=%d wlev=%d",
+ us->ppa_id, lq, (lq? qsize(RD(lq)): 0),
+ (lq? qsize(lq): 0));
+ cmn_err(CE_CONT, " mru=%d mtu=%d\n", us->mru, us->mtu);
+ }
+ }
+}