1 _ni=0; // network indent level
15 // the funny _foo/foo pairs exist so that if we get
16 // interrupted in the middle of one of these, _ni will
17 // get reset to 0 next time an external call happens.
24 print("ipfs(", fs\A, ") #I", fs.dev\D, "\n");
45 print("proto(", p\A, ") ", *(p.name\s), "\n");
52 if c != 0 && c.inuse then
72 print("conv(", c\A, ") ", *(p.name\s), "/", c.x\D, " ",
73 iptostr(*(c.laddr+12)), "!", c.lport\D, " ", iptostr(*(c.raddr+12)),
74 "!", c.rport\D, " rq ", qtostr(c.rq), " wq ", qtostr(c.wq),
75 " eq ", qtostr(c.eq), "\n");
88 return itoa(a&0xFF)+"."+itoa((a>>8)&0xFF)+"."+itoa((a>>16)&0xFF)+"."+itoa((a>>24)&0xFF);
96 return "queue("+itoa(q, "%ux")+") ["+itoa(q.len, "%d")+","+itoa(q.dlen, "%d")+","+itoa(qblocks(q), "%d")+"]";
121 print("queue(", q\A, ") len ", q.len\D, " dlen ", q.dlen\D, " limit ", q.limit\D, " nblocks ", qblocks(q)\D);
122 if q.state & Qstarve then
124 if q.state & Qmsg then
126 if q.state & Qclosed then
128 if q.state & Qflow then
130 if q.state & Qcoalesce then
157 print("block(", b\A, ") base ", b.base, " rp ", b.rp, "/", b.rp-b.base\D, " wp ", b.wp, "/", b.wp-b.base\D, " lim ", b.lim, "/", b.lim-b.base\D, "\n");
167 print("/sys/lib/acid/network");