Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/setkey remove ordering constraint between -h and -x.
details: https://anonhg.NetBSD.org/src/rev/3bdbdcf0d8d6
branches: trunk
changeset: 485003:3bdbdcf0d8d6
user: itojun <itojun%NetBSD.org@localhost>
date: Sun Apr 16 16:15:59 2000 +0000
description:
remove ordering constraint between -h and -x.
notified by: hubertf
diffstat:
usr.sbin/setkey/setkey.8 | 32 ++++++++++++++++----------------
usr.sbin/setkey/setkey.c | 15 +++++++++------
2 files changed, 25 insertions(+), 22 deletions(-)
diffs (169 lines):
diff -r 4daa934c43b3 -r 3bdbdcf0d8d6 usr.sbin/setkey/setkey.8
--- a/usr.sbin/setkey/setkey.8 Sun Apr 16 16:03:42 2000 +0000
+++ b/usr.sbin/setkey/setkey.8 Sun Apr 16 16:15:59 2000 +0000
@@ -1,6 +1,9 @@
+.\" $NetBSD: setkey.8,v 1.9 2000/04/16 16:15:59 itojun Exp $
+.\" $KAME: setkey.8,v 1.25 2000/04/16 16:11:17 itojun Exp $
+.\"
.\" Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
.\" All rights reserved.
-.\"
+.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@@ -12,7 +15,7 @@
.\" 3. Neither the name of the project nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
-.\"
+.\"
.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -25,17 +28,14 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $NetBSD: setkey.8,v 1.8 2000/04/11 00:11:46 hubertf Exp $
-.\" KAME Id: setkey.8,v 1.23 2000/03/13 05:33:53 itojun Exp
-.\"
.Dd May 17, 1998
.Dt SETKEY 8
.Os
-.\"
+.\"
.Sh NAME
.Nm setkey
.Nd manually manipulate the IPsec SA/SP database.
-.\"
+.\"
.Sh SYNOPSIS
.Nm setkey
.Op Fl dv
@@ -52,7 +52,7 @@
.Nm setkey
.Op Fl h
.Fl x
-.\"
+.\"
.Sh DESCRIPTION
.Nm
addes, updates, dumpes, or flushes
@@ -102,7 +102,7 @@
.It Fl h
Add hexadecimal dump on
.Fl x
-mode. The order is significant.
+mode.
.It Fl l
Loop forever with short output on
.Fl D .
@@ -228,10 +228,10 @@
.Pp
.It Ar extensions
take some of the following:
-.Bl -tag -width Fl -compact
+.Bl -tag -width Fl -compact
.\"
.It Fl m Ar mode
-Specify a security protocol mode for use.
+Specify a security protocol mode for use.
.Ar mode
is one of following:
.Li transport , tunnel
@@ -268,7 +268,7 @@
.\"
.Pp
.It Ar algorithm
-.Bl -tag -width Fl -compact
+.Bl -tag -width Fl -compact
.It Fl E Ar ealgo Ar key
Specify encryption algorithm.
.It Fl A Ar ealgo Ar key
@@ -522,7 +522,7 @@
deflate rfc2394
lzs rfc2395
.Ed
-.\"
+.\"
.Sh EXAMPLES
.Bd -literal -offset
add 3ffe:501:4819::1 3ffe:501:481d::1 esp 123457
@@ -545,14 +545,14 @@
-P out ipsec esp/tunnel/192.168.0.1-192.168.1.2/require ;
.Ed
-.\"
+.\"
.Sh RETURN VALUES
The command exits with 0 on success, and non-zero on errors.
-.\"
+.\"
.Sh SEE ALSO
.Xr ipsec_set_policy 3 ,
.Xr sysctl 8
-.\"
+.\"
.Sh HISTORY
The
.Nm
diff -r 4daa934c43b3 -r 3bdbdcf0d8d6 usr.sbin/setkey/setkey.c
--- a/usr.sbin/setkey/setkey.c Sun Apr 16 16:03:42 2000 +0000
+++ b/usr.sbin/setkey/setkey.c Sun Apr 16 16:15:59 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setkey.c,v 1.5 2000/03/15 00:24:31 itojun Exp $ */
+/* $NetBSD: setkey.c,v 1.6 2000/04/16 16:15:59 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* KAME Id: setkey.c,v 1.9 2000/02/06 10:56:11 itojun Exp */
+/* KAME Id: setkey.c,v 1.11 2000/04/16 16:14:09 itojun Exp */
#include <sys/types.h>
#include <sys/param.h>
@@ -65,6 +65,7 @@
#define MODE_SCRIPT 1
#define MODE_CMDDUMP 2
#define MODE_CMDFLUSH 3
+#define MODE_PROMISC 4
int so;
@@ -75,7 +76,6 @@
int f_mode = 0;
int f_cmddump = 0;
int f_policy = 0;
-int f_promisc = 0;
int f_hexdump = 0;
char *pname;
@@ -139,9 +139,8 @@
f_hexdump = 1;
break;
case 'x':
- f_promisc = 1;
- promisc();
- /*NOTREACHED*/
+ f_mode = MODE_PROMISC;
+ break;
case 'P':
f_policy = 1;
break;
@@ -173,8 +172,12 @@
if (parse(&fp))
exit (1);
break;
+ case MODE_PROMISC:
+ promisc();
+ /*NOTREACHED*/
default:
Usage();
+ /*NOTREACHED*/
}
exit(0);
Home |
Main Index |
Thread Index |
Old Index