diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1997-02-26 03:01:06 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1997-02-26 03:01:06 +0000 |
commit | 69b5d60558dcb932964f8d6d64517209707041b5 (patch) | |
tree | 73e664ba05ea8e4995c8e61d10df026997d9863e /sys | |
parent | aa13b4a3c977c2af183678dc0c96232d8e243c3e (diff) |
I/O packet counters for IP-in-IP and AH.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_ah.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_ahhmacmd5.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_ahhmacsha1.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_ahmd5.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_ip4.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_ip4.h | 3 |
6 files changed, 14 insertions, 9 deletions
diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c index bbc07dbde18..7a796351d3b 100644 --- a/sys/netinet/ip_ah.c +++ b/sys/netinet/ip_ah.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah.c,v 1.2 1997/02/24 14:06:36 niklas Exp $ */ +/* $OpenBSD: ip_ah.c,v 1.3 1997/02/26 03:01:02 angelos Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -74,6 +74,8 @@ ah_input(register struct mbuf *m, int iphlen) struct ifqueue *ifq = NULL; int s; + ahstat.ahs_input++; + /* * Strip IP options, if any. */ diff --git a/sys/netinet/ip_ahhmacmd5.c b/sys/netinet/ip_ahhmacmd5.c index a8b77e8fb54..764c6678614 100644 --- a/sys/netinet/ip_ahhmacmd5.c +++ b/sys/netinet/ip_ahhmacmd5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ahhmacmd5.c,v 1.4 1997/02/24 14:06:37 niklas Exp $ */ +/* $OpenBSD: ip_ahhmacmd5.c,v 1.5 1997/02/26 03:01:03 angelos Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -330,7 +330,7 @@ ahhmacmd5_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb, str MD5_CTX ctx; int ilen, ohlen; - + ahstat.ahs_output++; m = m_pullup(m, sizeof (struct ip)); if (m == NULL) return ENOBUFS; diff --git a/sys/netinet/ip_ahhmacsha1.c b/sys/netinet/ip_ahhmacsha1.c index c3b80b18c53..08bbe8750ca 100644 --- a/sys/netinet/ip_ahhmacsha1.c +++ b/sys/netinet/ip_ahhmacsha1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ahhmacsha1.c,v 1.4 1997/02/24 14:06:38 niklas Exp $ */ +/* $OpenBSD: ip_ahhmacsha1.c,v 1.5 1997/02/26 03:01:03 angelos Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -332,7 +332,7 @@ ahhmacsha1_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb, st SHA1_CTX ctx; int ilen, ohlen; - + ahstat.ahs_output++; m = m_pullup(m, sizeof (struct ip)); if (m == NULL) return ENOBUFS; diff --git a/sys/netinet/ip_ahmd5.c b/sys/netinet/ip_ahmd5.c index 5e693834fdd..246e5b852a8 100644 --- a/sys/netinet/ip_ahmd5.c +++ b/sys/netinet/ip_ahmd5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ahmd5.c,v 1.2 1997/02/24 14:06:38 niklas Exp $ */ +/* $OpenBSD: ip_ahmd5.c,v 1.3 1997/02/26 03:01:04 angelos Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -251,7 +251,7 @@ ahmd5_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb, struct int ilen, ohlen; - + ahstat.ahs_output++; m = m_pullup(m, sizeof (struct ip)); if (m == NULL) return ENOBUFS; diff --git a/sys/netinet/ip_ip4.c b/sys/netinet/ip_ip4.c index 602f9b4c449..d7dc49becca 100644 --- a/sys/netinet/ip_ip4.c +++ b/sys/netinet/ip_ip4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ip4.c,v 1.4 1997/02/24 14:06:41 niklas Exp $ */ +/* $OpenBSD: ip_ip4.c,v 1.5 1997/02/26 03:01:04 angelos Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -79,6 +79,7 @@ ip4_input(register struct mbuf *m, int iphlen) * Strip IP options, if any. */ + ip4stat.ip4s_ipackets++; if (iphlen > sizeof (struct ip)) { ip_stripoptions(m, (struct mbuf *)0); @@ -159,6 +160,7 @@ ipe4_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb, struct m struct ip4_xdata *xd; ushort ilen; + ip4stat.ip4s_opackets++; ipi = mtod(m, struct ip *); ilen = ntohs(ipi->ip_len); diff --git a/sys/netinet/ip_ip4.h b/sys/netinet/ip_ip4.h index d1a9f56c61e..b5f95394d81 100644 --- a/sys/netinet/ip_ip4.h +++ b/sys/netinet/ip_ip4.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ip4.h,v 1.3 1997/02/24 14:06:41 niklas Exp $ */ +/* $OpenBSD: ip_ip4.h,v 1.4 1997/02/26 03:01:05 angelos Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -41,6 +41,7 @@ struct ip4_xencap struct ip4stat { u_long ip4s_ipackets; /* total input packets */ + u_long ip4s_opackets; /* total output packets */ u_long ip4s_hdrops; /* packet shorter than header shows */ u_long ip4s_badlen; u_long ip4s_notip4; |