Skip to content

Commit

Permalink
re-imported sbin/route for scope changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jinmei committed Jul 26, 2005
1 parent 87794f1 commit 3de17b9
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 90 deletions.
5 changes: 2 additions & 3 deletions netbsd/sbin/route/Makefile
@@ -1,12 +1,11 @@
# $NetBSD: Makefile,v 1.20 1999/07/03 06:27:56 itojun Exp $ # $NetBSD: Makefile,v 1.21 2003/10/26 07:25:35 lukem Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93 # @(#)Makefile 8.1 (Berkeley) 6/5/93


PROG= route PROG= route
MAN= route.8 MAN= route.8
SRCS= route.c show.c keywords.c ccitt_addr.c SRCS= route.c show.c keywords.c ccitt_addr.c


CPPFLAGS+=-DINET6 CPPFLAGS+=-DINET6
CPPFLAGS+=-I${.CURDIR}/../../sys -I${.CURDIR}/../../include


# The Makefile over in ../../distrib/utils/x_route # The Makefile over in ../../distrib/utils/x_route
# would like keywords.[ch] to always exist here, so # would like keywords.[ch] to always exist here, so
Expand All @@ -15,6 +14,6 @@ CPPFLAGS+=-I${.CURDIR}/../../sys -I${.CURDIR}/../../include
# CPPFLAGS+=-I. # CPPFLAGS+=-I.
# CLEANFILES+= keywords.c keywords.h # CLEANFILES+= keywords.c keywords.h
# keywords.c keywords.h : keywords.sh # keywords.c keywords.h : keywords.sh
# sh keywords.sh # ${HOST_SH} keywords.sh


.include <bsd.prog.mk> .include <bsd.prog.mk>
8 changes: 2 additions & 6 deletions netbsd/sbin/route/ccitt_addr.c
@@ -1,4 +1,4 @@
/* $NetBSD: ccitt_addr.c,v 1.12 1997/09/16 07:04:17 lukem Exp $ */ /* $NetBSD: ccitt_addr.c,v 1.13 2003/08/07 10:04:38 agc Exp $ */


/* /*
* Copyright (c) 1990, 1993 * Copyright (c) 1990, 1993
Expand All @@ -12,11 +12,7 @@
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software * 3. Neither the name of the University nor the names of its contributors
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software * may be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
Expand Down
3 changes: 2 additions & 1 deletion netbsd/sbin/route/keywords.c
@@ -1,4 +1,4 @@
/* $NetBSD$ */ /* $NetBSD: keywords.c,v 1.5 2003/07/19 01:36:47 jrf Exp $ */


/* WARNING! This file was generated by keywords.sh */ /* WARNING! This file was generated by keywords.sh */


Expand Down Expand Up @@ -54,6 +54,7 @@ struct keytab keywords[] = {
{"x25", K_X25}, {"x25", K_X25},
{"xns", K_XNS}, {"xns", K_XNS},
{"xresolve", K_XRESOLVE}, {"xresolve", K_XRESOLVE},
{"flushall", K_FLUSHALL},
{0, 0} {0, 0}
}; };


3 changes: 2 additions & 1 deletion netbsd/sbin/route/keywords.h
@@ -1,4 +1,4 @@
/* $NetBSD$ */ /* $NetBSD: keywords.h,v 1.7 2003/07/19 01:36:47 jrf Exp $ */


/* WARNING! This file was generated by keywords.sh */ /* WARNING! This file was generated by keywords.sh */


Expand Down Expand Up @@ -56,3 +56,4 @@ extern struct keytab {
#define K_X25 46 #define K_X25 46
#define K_XNS 47 #define K_XNS 47
#define K_XRESOLVE 48 #define K_XRESOLVE 48
#define K_FLUSHALL 49
3 changes: 2 additions & 1 deletion netbsd/sbin/route/keywords.sh
@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $NetBSD: keywords.sh,v 1.6 2001/01/27 04:51:17 itojun Exp $ # $NetBSD: keywords.sh,v 1.7 2003/07/19 01:36:47 jrf Exp $
# @(#)keywords 8.2 (Berkeley) 3/19/94 # @(#)keywords 8.2 (Berkeley) 3/19/94
# #
# WARNING! If you change this file, re-run it! # WARNING! If you change this file, re-run it!
Expand Down Expand Up @@ -56,6 +56,7 @@ static
x25 x25
xns xns
xresolve xresolve
flushall
_EOF_ _EOF_




Expand Down
30 changes: 18 additions & 12 deletions netbsd/sbin/route/route.8
@@ -1,4 +1,4 @@
.\" $NetBSD: route.8,v 1.29.2.1 2003/10/02 09:01:20 tron Exp $ .\" $NetBSD: route.8,v 1.36 2003/10/02 00:09:06 itojun Exp $
.\" .\"
.\" Copyright (c) 1983, 1991, 1993 .\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved. .\" The Regents of the University of California. All rights reserved.
Expand All @@ -11,11 +11,7 @@
.\" 2. Redistributions in binary form must reproduce the above copyright .\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the .\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution. .\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software .\" 3. Neither the name of the University nor the names of its contributors
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software .\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission. .\" without specific prior written permission.
.\" .\"
Expand All @@ -33,7 +29,7 @@
.\" .\"
.\" @(#)route.8 8.4 (Berkeley) 6/1/94 .\" @(#)route.8 8.4 (Berkeley) 6/1/94
.\" .\"
.Dd October 23, 1998 .Dd July 19, 2003
.Dt ROUTE 8 .Dt ROUTE 8
.Os .Os
.Sh NAME .Sh NAME
Expand Down Expand Up @@ -110,6 +106,8 @@ utility provides several commands:
Add a route. Add a route.
.It Cm flush .It Cm flush
Remove all routes. Remove all routes.
.It Cm flushall
Remove all routes including the default gateway.
.It Cm delete .It Cm delete
Delete a specific route. Delete a specific route.
.It Cm change .It Cm change
Expand All @@ -127,14 +125,16 @@ routing lookup misses, or suspected network partitionings.
The monitor command has the syntax The monitor command has the syntax
.Pp .Pp
.Bd -filled -offset indent -compact .Bd -filled -offset indent -compact
.Nm "" Op Fl n .Nm
.Op Fl n
.Cm monitor .Cm monitor
.Ed .Ed
.Pp .Pp
The flush command has the syntax The flush command has the syntax
.Pp .Pp
.Bd -filled -offset indent -compact .Bd -filled -offset indent -compact
.Nm "" Op Fl n .Nm
.Op Fl n
.Cm flush .Cm flush
.Op Ar family .Op Ar family
.Ed .Ed
Expand All @@ -157,7 +157,8 @@ delineated family will be manipulated.
The other commands have the following syntax: The other commands have the following syntax:
.Pp .Pp
.Bd -filled -offset indent -compact .Bd -filled -offset indent -compact
.Nm "" Op Fl n .Nm
.Op Fl n
.Ar command .Ar command
.Op Fl net No \&| Fl host .Op Fl net No \&| Fl host
.Ar destination gateway .Ar destination gateway
Expand Down Expand Up @@ -186,6 +187,11 @@ or if the
is the symbolic name of a network, then the route is is the symbolic name of a network, then the route is
assumed to be to a network; otherwise, it is presumed to be a assumed to be to a network; otherwise, it is presumed to be a
route to a host. route to a host.
Optionally, the
.Ar destination
can also be specified in the
.Ar net Ns / Ns Ar bits
format.
.Pp .Pp
For example, For example,
.Li 128.32 .Li 128.32
Expand Down Expand Up @@ -328,8 +334,8 @@ the routing tables.
.Sh EXIT STATUS .Sh EXIT STATUS
The The
.Nm .Nm
utility exits 0 on success, and \*[Gt]0 if an error occurs. This includes utility exits 0 on success, and \*[Gt]0 if an error occurs.
the use of the This includes the use of the
.Cm get .Cm get
command to look up a route that is incomplete. command to look up a route that is incomplete.
.Sh EXAMPLES .Sh EXAMPLES
Expand Down

0 comments on commit 3de17b9

Please sign in to comment.