2 *****************************************************************************
6 * Author: Damien Stuart (dstuart@dstuart.org)
8 * Purpose: Header file for fwknopd replay_cache.c functions.
10 * Copyright 2010 Damien Stuart (dstuart@dstuart.org)
12 * License (GNU Public License):
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
29 *****************************************************************************
31 #ifndef REPLAY_CACHE_H
32 #define REPLAY_CACHE_H
34 #include "fwknopd_common.h"
37 typedef struct digest_cache_info {
40 unsigned short src_port;
41 unsigned short dst_port;
50 } digest_cache_info_t;
53 struct digest_cache_list {
54 digest_cache_info_t cache_info;
55 struct digest_cache_list *next;
61 int replay_cache_init(fko_srv_options_t *opts);
62 int is_replay(fko_srv_options_t *opts, char *digest);
63 int add_replay(fko_srv_options_t *opts, char *digest);
65 int replay_file_cache_init(fko_srv_options_t *opts);
66 int is_replay_file_cache(fko_srv_options_t *opts, char *digest);
67 int add_replay_file_cache(fko_srv_options_t *opts, char *digest);
68 void free_replay_list(fko_srv_options_t *opts);
70 int replay_db_cache_init(fko_srv_options_t *opts);
71 int is_replay_dbm_cache(fko_srv_options_t *opts, char *digest);
72 int add_replay_dbm_cache(fko_srv_options_t *opts, char *digest);
75 #endif /* REPLAY_CACHE_H */