From aa0f5b38aec14428b4b80e06f90ff781f8bca5f1 Mon Sep 17 00:00:00 2001 From: Rene Mayrhofer Date: Mon, 22 May 2006 05:12:18 +0000 Subject: Import initial strongswan 2.7.0 version into SVN. --- programs/tncfg/tncfg.c | 393 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 393 insertions(+) create mode 100644 programs/tncfg/tncfg.c (limited to 'programs/tncfg/tncfg.c') diff --git a/programs/tncfg/tncfg.c b/programs/tncfg/tncfg.c new file mode 100644 index 000000000..f6aeae0e2 --- /dev/null +++ b/programs/tncfg/tncfg.c @@ -0,0 +1,393 @@ +/* + * IPSEC interface configuration + * Copyright (C) 1996 John Ioannidis. + * Copyright (C) 1998, 1999, 2000, 2001 Richard Guy Briggs. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +char tncfg_c_version[] = "RCSID $Id: tncfg.c,v 1.1 2004/03/15 20:35:31 as Exp $"; + + +#include +#include +#include /* system(), strtoul() */ +#include /* getuid() */ +#include +#include /* ioctl() */ + +#include +#ifdef NET_21 /* from freeswan.h */ +#include +#include +#endif /* NET_21 */ /* from freeswan.h */ + +#if 0 +#include +#else +#include +#endif +#include +#include +#include + +#include "freeswan/ipsec_tunnel.h" + +static void +usage(char *name) +{ + fprintf(stdout,"%s --attach --virtual --physical \n", + name); + fprintf(stdout,"%s --detach --virtual \n", + name); + fprintf(stdout,"%s --clear\n", + name); + fprintf(stdout,"%s --help\n", + name); + fprintf(stdout,"%s --version\n", + name); + fprintf(stdout,"%s\n", + name); + fprintf(stdout, " [ --debug ] is optional to any %s command.\n", name); + fprintf(stdout, " [ --label