diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2006-06-01 15:47:27 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2006-06-01 15:47:27 +0000 |
commit | 6ec9adf62aa73d5899f30e2a9259295667a52aa9 (patch) | |
tree | d997e5085acc21d655c727422751dc114ffa2fa5 /sbin | |
parent | dad963a3b3eeee63ceef41474a2fafd7201569bc (diff) |
Prepare for SA grouping.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipsecctl/ipsecctl.c | 3 | ||||
-rw-r--r-- | sbin/ipsecctl/ipsecctl.h | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/sbin/ipsecctl/ipsecctl.c b/sbin/ipsecctl/ipsecctl.c index 0f0e34281ef..bfc8e35d876 100644 --- a/sbin/ipsecctl/ipsecctl.c +++ b/sbin/ipsecctl/ipsecctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsecctl.c,v 1.50 2006/06/01 06:20:30 todd Exp $ */ +/* $OpenBSD: ipsecctl.c,v 1.51 2006/06/01 15:47:26 hshoexer Exp $ */ /* * Copyright (c) 2004, 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org> * @@ -87,6 +87,7 @@ ipsecctl_rules(char *filename, int opts) bzero(&ipsec, sizeof(ipsec)); ipsec.opts = opts; TAILQ_INIT(&ipsec.rule_queue); + TAILQ_INIT(&ipsec.group_queue); if (strcmp(filename, "-") == 0) { fin = stdin; diff --git a/sbin/ipsecctl/ipsecctl.h b/sbin/ipsecctl/ipsecctl.h index c0353c69afb..81608a8f6d8 100644 --- a/sbin/ipsecctl/ipsecctl.h +++ b/sbin/ipsecctl/ipsecctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsecctl.h,v 1.39 2006/06/01 04:12:34 hshoexer Exp $ */ +/* $OpenBSD: ipsecctl.h,v 1.40 2006/06/01 15:47:26 hshoexer Exp $ */ /* * Copyright (c) 2004, 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org> * @@ -136,6 +136,8 @@ struct ipsec_transforms { extern const struct ipsec_xf authxfs[]; extern const struct ipsec_xf encxfs[]; +TAILQ_HEAD(dst_group_queue, ipsec_rule); + /* Complete state of one rule. */ struct ipsec_rule { u_int8_t type; @@ -162,14 +164,20 @@ struct ipsec_rule { u_int32_t nr; TAILQ_ENTRY(ipsec_rule) rule_entry; + TAILQ_ENTRY(ipsec_rule) group_entry; + TAILQ_ENTRY(ipsec_rule) dst_group_entry; + + struct dst_group_queue dst_group_queue; }; TAILQ_HEAD(ipsec_rule_queue, ipsec_rule); +TAILQ_HEAD(ipsec_group_queue, ipsec_rule); struct ipsecctl { u_int32_t rule_nr; int opts; struct ipsec_rule_queue rule_queue; + struct ipsec_group_queue group_queue; }; int parse_rules(FILE *, struct ipsecctl *); |