From: angelos Date: Wed, 26 Feb 1997 03:01:02 +0000 (+0000) Subject: I/O packet counters for IP-in-IP and AH. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bf0b80852a41fb2b990d88c1f8e0c09b2509f428;p=openbsd I/O packet counters for IP-in-IP and AH. --- 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;