2006-04-28 07:14:48 +00:00
|
|
|
/* cookie generation/verification routines.
|
|
|
|
* Copyright (C) 1998-2002 D. Hugh Redelmeier.
|
2006-04-10 14:19:10 +00:00
|
|
|
*
|
|
|
|
* 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 <http://www.fsf.org/copyleft/gpl.txt>.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2006-04-28 07:14:48 +00:00
|
|
|
#include <freeswan.h>
|
2006-04-10 14:19:10 +00:00
|
|
|
|
2009-04-19 19:16:09 +00:00
|
|
|
extern const u_char zero_cookie[COOKIE_SIZE]; /* guaranteed 0 */
|
2006-04-10 14:19:10 +00:00
|
|
|
|
2009-05-05 12:28:02 +00:00
|
|
|
extern void get_cookie(bool initiator, u_int8_t *cookie, int length,
|
|
|
|
ip_address *addr);
|
2006-04-10 14:19:10 +00:00
|
|
|
|
2006-04-28 07:14:48 +00:00
|
|
|
#define is_zero_cookie(cookie) all_zero((cookie), COOKIE_SIZE)
|