Remove now-unused wrappers for various routing functions.
This commit is contained in:
parent
0713024269
commit
10e0e23528
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=293886
@ -342,35 +342,6 @@ sys_setfib(struct thread *td, struct setfib_args *uap)
|
||||
/*
|
||||
* Packet routing routines.
|
||||
*/
|
||||
void
|
||||
rtalloc(struct route *ro)
|
||||
{
|
||||
|
||||
rtalloc_ign_fib(ro, 0UL, RT_DEFAULT_FIB);
|
||||
}
|
||||
|
||||
void
|
||||
rtalloc_fib(struct route *ro, u_int fibnum)
|
||||
{
|
||||
rtalloc_ign_fib(ro, 0UL, fibnum);
|
||||
}
|
||||
|
||||
void
|
||||
rtalloc_ign(struct route *ro, u_long ignore)
|
||||
{
|
||||
struct rtentry *rt;
|
||||
|
||||
if ((rt = ro->ro_rt) != NULL) {
|
||||
if (rt->rt_ifp != NULL && rt->rt_flags & RTF_UP)
|
||||
return;
|
||||
RTFREE(rt);
|
||||
ro->ro_rt = NULL;
|
||||
}
|
||||
ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, ignore, RT_DEFAULT_FIB);
|
||||
if (ro->ro_rt)
|
||||
RT_UNLOCK(ro->ro_rt);
|
||||
}
|
||||
|
||||
void
|
||||
rtalloc_ign_fib(struct route *ro, u_long ignore, u_int fibnum)
|
||||
{
|
||||
@ -538,17 +509,6 @@ rtfree(struct rtentry *rt)
|
||||
* Normally called as a result of a routing redirect
|
||||
* message from the network layer.
|
||||
*/
|
||||
void
|
||||
rtredirect(struct sockaddr *dst,
|
||||
struct sockaddr *gateway,
|
||||
struct sockaddr *netmask,
|
||||
int flags,
|
||||
struct sockaddr *src)
|
||||
{
|
||||
|
||||
rtredirect_fib(dst, gateway, netmask, flags, src, RT_DEFAULT_FIB);
|
||||
}
|
||||
|
||||
void
|
||||
rtredirect_fib(struct sockaddr *dst,
|
||||
struct sockaddr *gateway,
|
||||
@ -673,13 +633,6 @@ rtredirect_fib(struct sockaddr *dst,
|
||||
ifa_free(ifa);
|
||||
}
|
||||
|
||||
int
|
||||
rtioctl(u_long req, caddr_t data)
|
||||
{
|
||||
|
||||
return (rtioctl_fib(req, data, RT_DEFAULT_FIB));
|
||||
}
|
||||
|
||||
/*
|
||||
* Routing table ioctl interface.
|
||||
*/
|
||||
@ -775,19 +728,6 @@ ifa_ifwithroute(int flags, const struct sockaddr *dst, struct sockaddr *gateway,
|
||||
* Do appropriate manipulations of a routing tree given
|
||||
* all the bits of info needed
|
||||
*/
|
||||
int
|
||||
rtrequest(int req,
|
||||
struct sockaddr *dst,
|
||||
struct sockaddr *gateway,
|
||||
struct sockaddr *netmask,
|
||||
int flags,
|
||||
struct rtentry **ret_nrt)
|
||||
{
|
||||
|
||||
return (rtrequest_fib(req, dst, gateway, netmask, flags, ret_nrt,
|
||||
RT_DEFAULT_FIB));
|
||||
}
|
||||
|
||||
int
|
||||
rtrequest_fib(int req,
|
||||
struct sockaddr *dst,
|
||||
|
@ -436,8 +436,6 @@ int rtsock_routemsg(int, struct ifnet *ifp, int, struct rtentry *, int);
|
||||
/*
|
||||
* Note the following locking behavior:
|
||||
*
|
||||
* rtalloc_ign() and rtalloc() return ro->ro_rt unlocked
|
||||
*
|
||||
* rtalloc1() returns a locked rtentry
|
||||
*
|
||||
* rtfree() and RTFREE_LOCKED() require a locked rtentry
|
||||
@ -445,9 +443,7 @@ int rtsock_routemsg(int, struct ifnet *ifp, int, struct rtentry *, int);
|
||||
* RTFREE() uses an unlocked entry.
|
||||
*/
|
||||
|
||||
int rt_expunge(struct radix_node_head *, struct rtentry *);
|
||||
void rtfree(struct rtentry *);
|
||||
int rt_check(struct rtentry **, struct rtentry **, struct sockaddr *);
|
||||
void rt_updatemtu(struct ifnet *);
|
||||
|
||||
typedef int rt_walktree_f_t(struct rtentry *, void *);
|
||||
@ -458,15 +454,8 @@ void rt_flushifroutes(struct ifnet *ifp);
|
||||
|
||||
/* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */
|
||||
/* Thes are used by old code not yet converted to use multiple FIBS */
|
||||
void rtalloc_ign(struct route *ro, u_long ignflags);
|
||||
void rtalloc(struct route *ro); /* XXX deprecated, use rtalloc_ign(ro, 0) */
|
||||
struct rtentry *rtalloc1(struct sockaddr *, int, u_long);
|
||||
int rtinit(struct ifaddr *, int, int);
|
||||
int rtioctl(u_long, caddr_t);
|
||||
void rtredirect(struct sockaddr *, struct sockaddr *,
|
||||
struct sockaddr *, int, struct sockaddr *);
|
||||
int rtrequest(int, struct sockaddr *,
|
||||
struct sockaddr *, struct sockaddr *, int, struct rtentry **);
|
||||
|
||||
/* XXX MRT NEW VERSIONS THAT USE FIBs
|
||||
* For now the protocol indepedent versions are the same as the AF_INET ones
|
||||
@ -474,7 +463,6 @@ int rtrequest(int, struct sockaddr *,
|
||||
*/
|
||||
int rt_getifa_fib(struct rt_addrinfo *, u_int fibnum);
|
||||
void rtalloc_ign_fib(struct route *ro, u_long ignflags, u_int fibnum);
|
||||
void rtalloc_fib(struct route *ro, u_int fibnum);
|
||||
struct rtentry *rtalloc1_fib(struct sockaddr *, int, u_long, u_int);
|
||||
int rtioctl_fib(u_long, caddr_t, u_int);
|
||||
void rtredirect_fib(struct sockaddr *, struct sockaddr *,
|
||||
|
@ -191,12 +191,6 @@ in_rtalloc_ign(struct route *ro, u_long ignflags, u_int fibnum)
|
||||
rtalloc_ign_fib(ro, ignflags, fibnum);
|
||||
}
|
||||
|
||||
struct rtentry *
|
||||
in_rtalloc1(struct sockaddr *dst, int report, u_long ignflags, u_int fibnum)
|
||||
{
|
||||
return (rtalloc1_fib(dst, report, ignflags, fibnum));
|
||||
}
|
||||
|
||||
void
|
||||
in_rtredirect(struct sockaddr *dst,
|
||||
struct sockaddr *gateway,
|
||||
@ -208,9 +202,3 @@ in_rtredirect(struct sockaddr *dst,
|
||||
rtredirect_fib(dst, gateway, netmask, flags, src, fibnum);
|
||||
}
|
||||
|
||||
void
|
||||
in_rtalloc(struct route *ro, u_int fibnum)
|
||||
{
|
||||
rtalloc_ign_fib(ro, 0UL, fibnum);
|
||||
}
|
||||
|
||||
|
@ -387,8 +387,6 @@ void in_domifdetach(struct ifnet *, void *);
|
||||
|
||||
/* XXX */
|
||||
void in_rtalloc_ign(struct route *ro, u_long ignflags, u_int fibnum);
|
||||
void in_rtalloc(struct route *ro, u_int fibnum);
|
||||
struct rtentry *in_rtalloc1(struct sockaddr *, int, u_long, u_int);
|
||||
void in_rtredirect(struct sockaddr *, struct sockaddr *,
|
||||
struct sockaddr *, int, struct sockaddr *, u_int);
|
||||
#endif /* _KERNEL */
|
||||
|
@ -538,7 +538,7 @@ X_mrt_ioctl(u_long cmd, caddr_t data, int fibnum __unused)
|
||||
int error = 0;
|
||||
|
||||
/*
|
||||
* Currently the only function calling this ioctl routine is rtioctl().
|
||||
* Currently the only function calling this ioctl routine is rtioctl_fib().
|
||||
* Typically, only root can create the raw socket in order to execute
|
||||
* this ioctl method, however the request might be coming from a prison
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user