Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Refactor: rtrequest_newmsg() is no longer used after...
details: https://anonhg.NetBSD.org/src/rev/29ef1673bef8
branches: trunk
changeset: 369640:29ef1673bef8
user: knakahara <knakahara%NetBSD.org@localhost>
date: Fri Aug 26 08:32:22 2022 +0000
description:
Refactor: rtrequest_newmsg() is no longer used after nd6_rtr.c:r1.149
That has bumped up to 9.99.66 when nd6_rtr.c:r1.149 was commited.
diffstat:
sys/net/route.c | 33 ++-------------------------------
sys/net/route.h | 4 +---
2 files changed, 3 insertions(+), 34 deletions(-)
diffs (72 lines):
diff -r de59bc8e96d5 -r 29ef1673bef8 sys/net/route.c
--- a/sys/net/route.c Fri Aug 26 07:22:45 2022 +0000
+++ b/sys/net/route.c Fri Aug 26 08:32:22 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.230 2021/12/05 04:57:38 msaitoh Exp $ */
+/* $NetBSD: route.c,v 1.231 2022/08/26 08:32:22 knakahara Exp $ */
/*-
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.230 2021/12/05 04:57:38 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.231 2022/08/26 08:32:22 knakahara Exp $");
#include <sys/param.h>
#ifdef RTFLUSH_DEBUG
@@ -1055,35 +1055,6 @@
return rtrequest1(req, &info, ret_nrt);
}
-/*
- * It's a utility function to add/remove a route to/from the routing table
- * and tell user processes the addition/removal on success.
- */
-int
-rtrequest_newmsg(const int req, const struct sockaddr *dst,
- const struct sockaddr *gateway, const struct sockaddr *netmask,
- const int flags)
-{
- int error;
- struct rtentry *ret_nrt = NULL;
-
- KASSERT(req == RTM_ADD || req == RTM_DELETE);
-
- error = rtrequest(req, dst, gateway, netmask, flags, &ret_nrt);
- if (error != 0)
- return error;
-
- KASSERT(ret_nrt != NULL);
-
- rt_newmsg(req, ret_nrt); /* tell user process */
- if (req == RTM_DELETE)
- rt_free(ret_nrt);
- else
- rt_unref(ret_nrt);
-
- return 0;
-}
-
static struct ifnet *
rt_getifp(struct rt_addrinfo *info, struct psref *psref)
{
diff -r de59bc8e96d5 -r 29ef1673bef8 sys/net/route.h
--- a/sys/net/route.h Fri Aug 26 07:22:45 2022 +0000
+++ b/sys/net/route.h Fri Aug 26 08:32:22 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.h,v 1.129 2021/08/09 20:49:10 andvar Exp $ */
+/* $NetBSD: route.h,v 1.130 2022/08/26 08:32:22 knakahara Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -447,8 +447,6 @@
const struct sockaddr *, const struct sockaddr *, int,
struct rtentry **);
int rtrequest1(int, struct rt_addrinfo *, struct rtentry **);
-int rtrequest_newmsg(const int, const struct sockaddr *,
- const struct sockaddr *, const struct sockaddr *, const int);
int rt_ifa_addlocal(struct ifaddr *);
int rt_ifa_remlocal(struct ifaddr *, struct ifaddr *);
Home |
Main Index |
Thread Index |
Old Index