-/* $OpenBSD: route.c,v 1.427 2024/01/31 14:56:42 bluhm Exp $ */
+/* $OpenBSD: route.c,v 1.428 2024/02/05 23:16:39 bluhm Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
ro->ro_tableid == rtableid &&
ro->ro_dst.sa_family == AF_INET &&
satosin(&ro->ro_dst)->sin_addr.s_addr == addr.s_addr) {
+ ipstat_inc(ips_rtcachehit);
return;
}
+ ipstat_inc(ips_rtcachemiss);
rtfree(ro->ro_rt);
ro->ro_rt = NULL;
ro->ro_generation = gen;
-/* $OpenBSD: ip_var.h,v 1.111 2024/02/03 22:50:09 mvs Exp $ */
+/* $OpenBSD: ip_var.h,v 1.112 2024/02/05 23:16:39 bluhm Exp $ */
/* $NetBSD: ip_var.h,v 1.16 1996/02/13 23:43:20 christos Exp $ */
/*
u_long ips_inswcsum; /* software checksummed on input */
u_long ips_outswcsum; /* software checksummed on output */
u_long ips_notmember; /* multicasts for unregistered groups */
+ u_long ips_rtcachehit; /* valid route found in cache */
+ u_long ips_rtcachemiss; /* route cache with new destination */
u_long ips_wrongif; /* packet received on wrong interface */
u_long ips_idropped; /* lost input due to nobufs, etc. */
};
ips_inswcsum, /* software checksummed on input */
ips_outswcsum, /* software checksummed on output */
ips_notmember, /* multicasts for unregistered groups */
+ ips_rtcachehit, /* valid route to destination found in cache */
+ ips_rtcachemiss, /* route cache filled with new destination */
ips_wrongif, /* packet received on wrong interface */
ips_idropped, /* lost input packets due to nobufs, etc. */
-/* $OpenBSD: ip6_var.h,v 1.110 2024/02/03 22:50:09 mvs Exp $ */
+/* $OpenBSD: ip6_var.h,v 1.111 2024/02/05 23:16:39 bluhm Exp $ */
/* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */
/*
/* number of times that an deprecated address is chosen */
u_int64_t ip6s_sources_deprecated[16];
- u_int64_t ip6s_forward_cachehit;
- u_int64_t ip6s_forward_cachemiss;
+ u_int64_t ip6s_rtcachehit; /* valid route found in cache */
+ u_int64_t ip6s_rtcachemiss; /* route cache with new destination */
u_int64_t ip6s_wrongif; /* packet received on wrong interface */
u_int64_t ip6s_idropped; /* lost input due to nobufs, etc. */
};
ip6s_sources_samescope = ip6s_sources_otherif + 16,
ip6s_sources_otherscope = ip6s_sources_samescope + 16,
ip6s_sources_deprecated = ip6s_sources_otherscope + 16,
- ip6s_forward_cachehit = ip6s_sources_deprecated + 16,
- ip6s_forward_cachemiss,
+ ip6s_rtcachehit = ip6s_sources_deprecated + 16,
+ ip6s_rtcachemiss,
ip6s_wrongif,
ip6s_idropped,
-/* $OpenBSD: inet.c,v 1.179 2023/09/04 23:00:36 bluhm Exp $ */
+/* $OpenBSD: inet.c,v 1.180 2024/02/05 23:16:39 bluhm Exp $ */
/* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */
/*
p(ips_inswcsum, "\t%lu input datagram%s software-checksummed\n");
p(ips_outswcsum, "\t%lu output datagram%s software-checksummed\n");
p(ips_notmember, "\t%lu multicast packet%s which we don't join\n");
+ p1(ips_rtcachehit, "\t%lu route cache hit\n");
+ p1(ips_rtcachemiss, "\t%lu route cache miss\n");
p(ips_wrongif, "\t%lu packet%s received on wrong interface\n");
p(ips_idropped, "\t%lu input packet%s dropped due to no bufs, etc.\n");
#undef p
-/* $OpenBSD: inet6.c,v 1.56 2022/08/12 14:49:15 bluhm Exp $ */
+/* $OpenBSD: inet6.c,v 1.57 2024/02/05 23:16:39 bluhm Exp $ */
/* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */
/*
* Copyright (c) 1983, 1988, 1993
p(ip6s_cantfrag, "\t%llu datagram%s that can't be fragmented\n");
p(ip6s_badscope, "\t%llu packet%s that violated scope rules\n");
p(ip6s_notmember, "\t%llu multicast packet%s which we don't join\n");
- p(ip6s_wrongif, "\t%llu packet%s received on wrong interface\n");
for (first = 1, i = 0; i < 256; i++)
if (ip6stat.ip6s_nxthist[i] != 0) {
if (first) {
PRINT_SCOPESTAT(ip6s_sources_deprecated[i], i);
}
}
-
- p1(ip6s_forward_cachehit, "\t%llu forward cache hit\n");
- p1(ip6s_forward_cachemiss, "\t%llu forward cache miss\n");
+ p1(ip6s_rtcachehit, "\t%llu route cache hit\n");
+ p1(ip6s_rtcachemiss, "\t%llu route cache miss\n");
+ p(ip6s_wrongif, "\t%llu packet%s received on wrong interface\n");
p(ip6s_idropped,
"\t%llu input packet%s dropped due to no bufs, etc.\n");
#undef p