summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ip4.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1997-07-14 08:48:48 +0000
committerNiels Provos <provos@cvs.openbsd.org>1997-07-14 08:48:48 +0000
commitc3a2298d51e059cd301992f6b91d3f3997af4f97 (patch)
treeadb96418b6e9ecbf80d1e69c6ab9cbb935d25e67 /sys/netinet/ip_ip4.c
parentaf2f31378b24787947acccc4300ac8f758a21a6a (diff)
global byte counters.
Diffstat (limited to 'sys/netinet/ip_ip4.c')
-rw-r--r--sys/netinet/ip_ip4.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/ip_ip4.c b/sys/netinet/ip_ip4.c
index 6416a159f92..ac9331a7439 100644
--- a/sys/netinet/ip_ip4.c
+++ b/sys/netinet/ip_ip4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ip4.c,v 1.11 1997/07/11 23:37:58 provos Exp $ */
+/* $OpenBSD: ip_ip4.c,v 1.12 1997/07/14 08:48:47 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
@@ -120,7 +120,9 @@ ip4_input(register struct mbuf *m, int iphlen)
}
ipi = (struct ip *) ((caddr_t) ipo + iphlen);
-
+
+ ip4stat.ip4s_ibytes += ntohs(ipi->ip_len);
+
/*
* RFC 1853 specifies that the inner TTL should not be touched on
* decapsulation. There's no reason this comment should be here, but
@@ -238,6 +240,8 @@ ipe4_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
tdb->tdb_cur_bytes += ntohs(ipo->ip_len) - (ipo->ip_hl << 2);
}
+ ip4stat.ip4s_obytes += ntohs(ipo->ip_len) - (ipo->ip_hl << 2);
+
return 0;
/* return ip_output(m, NULL, NULL, IP_ENCAPSULATED, NULL); */