summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-04-09 11:15:50 +0000
committerglebius <glebius@FreeBSD.org>2014-04-09 11:15:50 +0000
commita25c39725c84ba2fa1b634932a49f04424be9a9d (patch)
treee406a63fc682e1f5f0749775ea0df5528b04c560
parentecc4e56cfaad4f3823fe6215d844db777085a510 (diff)
downloadFreeBSD-src-a25c39725c84ba2fa1b634932a49f04424be9a9d.zip
FreeBSD-src-a25c39725c84ba2fa1b634932a49f04424be9a9d.tar.gz
Merge r263203: garbage collect long time obsoleted (or never used) stuff
from routing API.
-rw-r--r--share/man/man4/route.42
-rw-r--r--share/man/man9/rtentry.92
-rw-r--r--sys/net/iso88025.h4
-rw-r--r--sys/net/route.c9
-rw-r--r--sys/net/route.h34
-rw-r--r--sys/sys/sockio.h4
-rw-r--r--usr.bin/netstat/netstat.111
-rw-r--r--usr.bin/netstat/route.c7
-rw-r--r--usr.sbin/ppp/route.c19
-rw-r--r--usr.sbin/route6d/route6d.c21
10 files changed, 10 insertions, 103 deletions
diff --git a/share/man/man4/route.4 b/share/man/man4/route.4
index b85b41c..1e273a2 100644
--- a/share/man/man4/route.4
+++ b/share/man/man4/route.4
@@ -196,8 +196,6 @@ Messages include:
#define RTM_REDIRECT 0x6 /* Told to use different route */
#define RTM_MISS 0x7 /* Lookup failed on this address */
#define RTM_LOCK 0x8 /* fix specified metrics */
-#define RTM_OLDADD 0x9 /* caused by SIOCADDRT */
-#define RTM_OLDDEL 0xa /* caused by SIOCDELRT */
#define RTM_RESOLVE 0xb /* request to resolve dst to LL addr - unused */
#define RTM_NEWADDR 0xc /* address being added to iface */
#define RTM_DELADDR 0xd /* address being removed from iface */
diff --git a/share/man/man9/rtentry.9 b/share/man/man9/rtentry.9
index 12fa93d..836f687 100644
--- a/share/man/man9/rtentry.9
+++ b/share/man/man9/rtentry.9
@@ -157,8 +157,6 @@ Requests that output sent via this route be discarded.
.It Dv RTF_PROTO2
.It Dv RTF_PROTO3
Protocol-specific.
-.It Dv RTF_PRCLONING
-This flag is obsolete and simply ignored by facility.
.It Dv RTF_PINNED
(Reserved for future use to indicate routes which are not to be
modified by a routing protocol.)
diff --git a/sys/net/iso88025.h b/sys/net/iso88025.h
index 2faab84..11bd6ec 100644
--- a/sys/net/iso88025.h
+++ b/sys/net/iso88025.h
@@ -162,11 +162,13 @@ struct iso88025_addr {
#define ISO88025_BPF_UNSUPPORTED 0
#define ISO88025_BPF_SUPPORTED 1
+#ifdef _KERNEL
void iso88025_ifattach (struct ifnet *, const u_int8_t *, int);
void iso88025_ifdetach (struct ifnet *, int);
int iso88025_ioctl (struct ifnet *, u_long, caddr_t );
int iso88025_output (struct ifnet *, struct mbuf *,
const struct sockaddr *, struct route *);
void iso88025_input (struct ifnet *, struct mbuf *);
+#endif /* _KERNEL */
-#endif
+#endif /* !_NET_ISO88025_H_ */
diff --git a/sys/net/route.c b/sys/net/route.c
index e546e20..d99b0ab 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1682,15 +1682,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum)
return (error);
}
-#ifndef BURN_BRIDGES
-/* special one for inet internal use. may not use. */
-int
-rtinit_fib(struct ifaddr *ifa, int cmd, int flags)
-{
- return (rtinit1(ifa, cmd, flags, -1));
-}
-#endif
-
/*
* Set up a routing table entry, normally
* for an interface.
diff --git a/sys/net/route.h b/sys/net/route.h
index a9fcbd0..8f47acf 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -84,10 +84,6 @@ struct rt_metrics {
#define RT_DEFAULT_FIB 0 /* Explicitly mark fib=0 restricted cases */
extern u_int rt_numfibs; /* number fo usable routing tables */
-/*
- * XXX kernel function pointer `rt_output' is visible to applications.
- */
-struct mbuf;
/*
* We distinguish between routes to hosts and routes to networks,
@@ -129,20 +125,6 @@ struct rtentry {
};
#endif /* _KERNEL || _WANT_RTENTRY */
-/*
- * Following structure necessary for 4.3 compatibility;
- * We should eventually move it to a compat file.
- */
-struct ortentry {
- u_long rt_hash; /* to speed lookups */
- struct sockaddr rt_dst; /* key */
- struct sockaddr rt_gateway; /* value */
- short rt_flags; /* up/down?, host/net */
- short rt_refcnt; /* # held references */
- u_long rt_use; /* raw # packets forwarded */
- struct ifnet *rt_ifp; /* the answer: interface to use */
-};
-
#define RTF_UP 0x1 /* route usable */
#define RTF_GATEWAY 0x2 /* destination is a gateway */
#define RTF_HOST 0x4 /* host entry (net otherwise) */
@@ -160,12 +142,7 @@ struct ortentry {
#define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */
#define RTF_PROTO2 0x4000 /* protocol specific routing flag */
#define RTF_PROTO1 0x8000 /* protocol specific routing flag */
-
-/* XXX: temporary to stay API/ABI compatible with userland */
-#ifndef _KERNEL
-#define RTF_PRCLONING 0x10000 /* unused, for compatibility */
-#endif
-
+/* 0x10000 unused, was RTF_PRCLONING */
/* 0x20000 unused, was RTF_WASCLONED */
#define RTF_PROTO3 0x40000 /* protocol specific routing flag */
/* 0x80000 unused */
@@ -227,8 +204,8 @@ struct rt_msghdr {
#define RTM_REDIRECT 0x6 /* Told to use different route */
#define RTM_MISS 0x7 /* Lookup failed on this address */
#define RTM_LOCK 0x8 /* fix specified metrics */
-#define RTM_OLDADD 0x9 /* caused by SIOCADDRT */
-#define RTM_OLDDEL 0xa /* caused by SIOCDELRT */
+ /* 0x9 */
+ /* 0xa */
#define RTM_RESOLVE 0xb /* req to resolve dst to LL addr */
#define RTM_NEWADDR 0xc /* address being added to iface */
#define RTM_DELADDR 0xd /* address being removed from iface */
@@ -398,11 +375,6 @@ void rtredirect(struct sockaddr *, struct sockaddr *,
int rtrequest(int, struct sockaddr *,
struct sockaddr *, struct sockaddr *, int, struct rtentry **);
-#ifndef BURN_BRIDGES
-/* defaults to "all" FIBs */
-int rtinit_fib(struct ifaddr *, int, int);
-#endif
-
/* XXX MRT NEW VERSIONS THAT USE FIBs
* For now the protocol indepedent versions are the same as the AF_INET ones
* but this will change..
diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h
index df0d4b2..2d38e48 100644
--- a/sys/sys/sockio.h
+++ b/sys/sys/sockio.h
@@ -44,8 +44,8 @@
#define SIOCSPGRP _IOW('s', 8, int) /* set process group */
#define SIOCGPGRP _IOR('s', 9, int) /* get process group */
-#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */
-#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */
+/* SIOCADDRT _IOW('r', 10, struct ortentry) 4.3BSD */
+/* SIOCDELRT _IOW('r', 11, struct ortentry) 4.3BSD */
#define SIOCGETVIFCNT _IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */
#define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */
diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1
index cd2dded..d4f12af 100644
--- a/usr.bin/netstat/netstat.1
+++ b/usr.bin/netstat/netstat.1
@@ -243,14 +243,6 @@ If
is also present,
show the contents of the internal Patricia tree
structures; used for debugging.
-If
-.Fl a
-is also present,
-show protocol-cloned routes
-(routes generated by an
-.Dv RTF_PRCLONING
-parent route);
-normally these routes are not shown.
When
.Fl W
is also present,
@@ -430,8 +422,6 @@ The mapping between letters and flags is:
.It Li 3 Ta Dv RTF_PROTO3 Ta "Protocol specific routing flag #3"
.It Li B Ta Dv RTF_BLACKHOLE Ta "Just discard pkts (during updates)"
.It Li b Ta Dv RTF_BROADCAST Ta "The route represents a broadcast address"
-.It Li C Ta Dv RTF_CLONING Ta "Generate new routes on use"
-.It Li c Ta Dv RTF_PRCLONING Ta "Protocol-specified generate new routes on use"
.It Li D Ta Dv RTF_DYNAMIC Ta "Created dynamically (by redirect)"
.It Li G Ta Dv RTF_GATEWAY Ta "Destination requires forwarding by intermediary"
.It Li H Ta Dv RTF_HOST Ta "Host entry (net otherwise)"
@@ -440,7 +430,6 @@ The mapping between letters and flags is:
.It Li R Ta Dv RTF_REJECT Ta "Host or net unreachable"
.It Li S Ta Dv RTF_STATIC Ta "Manually added"
.It Li U Ta Dv RTF_UP Ta "Route usable"
-.It Li W Ta Dv RTF_WASCLONED Ta "Route was generated as a result of cloning"
.It Li X Ta Dv RTF_XRESOLVE Ta "External daemon translates proto to link address"
.El
.Pp
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c
index 88fe07d..26581b4 100644
--- a/usr.bin/netstat/route.c
+++ b/usr.bin/netstat/route.c
@@ -92,19 +92,12 @@ struct bits {
{ RTF_STATIC, 'S' },
{ RTF_PROTO1, '1' },
{ RTF_PROTO2, '2' },
- { RTF_PRCLONING,'c' },
{ RTF_PROTO3, '3' },
{ RTF_BLACKHOLE,'B' },
{ RTF_BROADCAST,'b' },
#ifdef RTF_LLINFO
{ RTF_LLINFO, 'L' },
#endif
-#ifdef RTF_WASCLONED
- { RTF_WASCLONED,'W' },
-#endif
-#ifdef RTF_CLONING
- { RTF_CLONING, 'C' },
-#endif
{ 0 , 0 }
};
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index e7db97e..758b403 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -158,26 +158,16 @@ static struct bits {
{ RTF_MODIFIED, 'M' },
{ RTF_DONE, 'd' },
{ RTF_XRESOLVE, 'X' },
-#ifdef RTF_CLONING
- { RTF_CLONING, 'C' },
-#endif
{ RTF_STATIC, 'S' },
{ RTF_PROTO1, '1' },
{ RTF_PROTO2, '2' },
{ RTF_BLACKHOLE, 'B' },
-
#ifdef RTF_LLINFO
{ RTF_LLINFO, 'L' },
#endif
#ifdef RTF_CLONING
{ RTF_CLONING, 'C' },
#endif
-#ifdef RTF_WASCLONED
- { RTF_WASCLONED, 'W' },
-#endif
-#ifdef RTF_PRCLONING
- { RTF_PRCLONING, 'c' },
-#endif
#ifdef RTF_PROTO3
{ RTF_PROTO3, '3' },
#endif
@@ -187,10 +177,6 @@ static struct bits {
{ 0, '\0' }
};
-#ifndef RTF_WASCLONED
-#define RTF_WASCLONED (0)
-#endif
-
static void
p_flags(struct prompt *prompt, u_int32_t f, unsigned max)
{
@@ -434,7 +420,7 @@ route_IfDelete(struct bundle *bundle, int all)
* route X was cloned from route Y (and is no longer there 'cos it
* may have gone with route Y).
*/
- if (RTF_WASCLONED == 0 && pass == 0)
+ if (pass == 0)
/* So we can't tell ! */
continue;
for (cp = sp; cp < ep; cp += rtm->rtm_msglen) {
@@ -461,8 +447,7 @@ route_IfDelete(struct bundle *bundle, int all)
sa[RTAX_GATEWAY]->sa_family == AF_INET6 ||
#endif
sa[RTAX_GATEWAY]->sa_family == AF_LINK) {
- if ((pass == 0 && (rtm->rtm_flags & RTF_WASCLONED)) ||
- (pass == 1 && !(rtm->rtm_flags & RTF_WASCLONED))) {
+ if (pass == 1) {
ncprange_setsa(&range, sa[RTAX_DST], sa[RTAX_NETMASK]);
rt_Set(bundle, RTM_DELETE, &range, NULL, 0, 0);
} else
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c
index 368244f..2a7dbe6 100644
--- a/usr.sbin/route6d/route6d.c
+++ b/usr.sbin/route6d/route6d.c
@@ -1899,10 +1899,6 @@ rtrecv(void)
if (!rt_deladdr(ifcp, rta[RTAX_IFA], rta[RTAX_NETMASK]))
iface++;
break;
- case RTM_OLDADD:
- case RTM_OLDDEL:
- trace(1, "\tnot supported yet, ignored\n");
- break;
}
}
@@ -2465,17 +2461,9 @@ do { \
RTTYPE("REDIRECT", RTM_REDIRECT);
RTTYPE("MISS", RTM_MISS);
RTTYPE("LOCK", RTM_LOCK);
- RTTYPE("OLDADD", RTM_OLDADD);
- RTTYPE("OLDDEL", RTM_OLDDEL);
RTTYPE("NEWADDR", RTM_NEWADDR);
RTTYPE("DELADDR", RTM_DELADDR);
RTTYPE("IFINFO", RTM_IFINFO);
-#ifdef RTM_OLDADD
- RTTYPE("OLDADD", RTM_OLDADD);
-#endif
-#ifdef RTM_OLDDEL
- RTTYPE("OLDDEL", RTM_OLDDEL);
-#endif
#ifdef RTM_OIFINFO
RTTYPE("OIFINFO", RTM_OIFINFO);
#endif
@@ -2516,18 +2504,9 @@ do { \
#ifdef RTF_MASK
RTFLAG("m", RTF_MASK);
#endif
-#ifdef RTF_CLONING
- RTFLAG("C", RTF_CLONING);
-#endif
#ifdef RTF_CLONED
RTFLAG("c", RTF_CLONED);
#endif
-#ifdef RTF_PRCLONING
- RTFLAG("c", RTF_PRCLONING);
-#endif
-#ifdef RTF_WASCLONED
- RTFLAG("W", RTF_WASCLONED);
-#endif
RTFLAG("X", RTF_XRESOLVE);
#ifdef RTF_LLINFO
RTFLAG("L", RTF_LLINFO);
OpenPOWER on IntegriCloud