/* * SA grouping * Copyright (C) 1996 John Ioannidis. * Copyright (C) 1997, 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. */ #include #include /* new */ #include #include #include /* open() */ #include /* open() */ #include #include /* system(), strtoul() */ #include #include #include /* #include */ #include #include #include #include #if 0 #include /* CONFIG_IPSEC_PFKEYv2 */ #endif #include "constants.h" #include "lswlog.h" #include #include #include #include "libreswan/pfkey_debug.h" #include "pfkey_help.h" #include "libreswan/radij.h" #include "libreswan/ipsec_encap.h" #include "libreswan/ipsec_ah.h" #include "lsw_select.h" char *progname; int pfkey_sock; uint32_t pfkey_seq = 0; struct said_af { int af; ip_said said; }; /* to store the given saids and their address families in an array */ /* XXX: Note that we do *not* check if the address families of all SAID?s are the same. * This can make it possible to group SAs for IPv4 addresses with SAs for * IPv6 addresses (perhaps some kind of IPv4-over-secIPv6 or vice versa). * Do not know, if this is a bug or feature */ static void usage(char *s) { fprintf(stdout, "usage: Note: position of options and arguments is important!\n"); fprintf(stdout, "usage: %s [ --debug ] [ --label