ref: fb9b03d7878d7c4820cebdfc605639b669cb370b
parent: dfca0be219074f8473683256b1b9ca986ec37c43
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun May 14 20:18:08 EDT 2023
devip: maintain packet counters for pktmedium
--- a/sys/src/9/ip/pktmedium.c
+++ b/sys/src/9/ip/pktmedium.c
@@ -47,6 +47,7 @@
static void
pktbwrite(Ipifc *ifc, Block *bp, int, uchar*, Routehint*)
{
+ ifc->out++;
/* enqueue onto the conversation's rq */
if(ifc->conv->snoopers.ref > 0)
qpass(ifc->conv->sq, copyblock(bp, BLEN(bp)));
@@ -59,6 +60,7 @@
static void
pktin(Fs *f, Ipifc *ifc, Block *bp)
{
+ ifc->in++;
if(ifc->lifc == nil)
freeb(bp);
else {