/* * control KLIPS debugging options * Copyright (C) 1996 John Ioannidis. * Copyright (C) 1998, 1999, 2000, 2001 Richard Guy Briggs * 2001 Michael Richardson * * 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. */ #include #include /* new */ #include #include #include #include /* system() */ #include /* open() */ #include /* open() */ #include #include #include #include #include #include #include #if 0 #include /* CONFIG_IPSEC_PFKEYv2 */ #endif /* permanently turn it on since netlink support has been disabled */ #include #include #include #include "libreswan/pfkey_debug.h" #include "socketwrapper.h" #include "lswlog.h" #include "libreswan/radij.h" #include "libreswan/ipsec_encap.h" #ifndef CONFIG_KLIPS_DEBUG #define CONFIG_KLIPS_DEBUG #endif /* CONFIG_KLIPS_DEBUG */ #include "libreswan/ipsec_tunnel.h" #include #include #include "lsw_select.h" #include "lswlog.h" __u32 bigbuf[1024]; char *program_name; int pfkey_sock; uint32_t pfkey_seq = 0; char copyright[] = "Copyright (C) 1999 Henry Spencer, Richard Guy Briggs, D. Hugh Redelmeier,\n\ Sandy Harris, Angelos D. Keromytis, John Ioannidis.\n\ \n\ This program is free software; you can redistribute it and/or modify it\n\ under the terms of the GNU General Public License as published by the\n\ Free Software Foundation; either version 2 of the License, or (at your\n\ option) any later version. See .\n\ \n\ This program is distributed in the hope that it will be useful, but\n\ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n\ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n\ (file COPYING in the distribution) for more details.\n"; static void usage(char * arg) { fprintf(stdout, "usage: %s {--set|--clear} {tunnel|tunnel-xmit|netlink|xform|eroute|spi|radij|esp|ah|rcv|pfkey|ipcomp|verbose}\n", arg); fprintf(stdout, " %s {--all|--none}\n", arg); fprintf(stdout, " %s --help\n", arg); fprintf(stdout, " %s --version\n", arg); fprintf(stdout, " %s\n", arg); fprintf(stdout, " [ --debug ] is optional to any %s command\n", arg); fprintf(stdout, " [ --label