summaryrefslogtreecommitdiff
path: root/sbin/iked/iked.h
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2012-05-29 15:09:13 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2012-05-29 15:09:13 +0000
commit698e0023fa1a7b4f5ee9538ebddb2382616a5d12 (patch)
tree3bd6e90dcf38aaa7aa831d1b82393603a590b47f /sbin/iked/iked.h
parent3bec1f9ae8a78638c50da292ba007f063c667b93 (diff)
improve timer framework; will be needed soon
Diffstat (limited to 'sbin/iked/iked.h')
-rw-r--r--sbin/iked/iked.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h
index 8fb79c40076..8ad1c618d36 100644
--- a/sbin/iked/iked.h
+++ b/sbin/iked/iked.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iked.h,v 1.44 2012/05/23 14:54:04 mikeb Exp $ */
+/* $OpenBSD: iked.h,v 1.45 2012/05/29 15:09:12 mikeb Exp $ */
/* $vantronix: iked.h,v 1.61 2010/06/03 07:57:33 reyk Exp $ */
/*
@@ -97,6 +97,13 @@ enum privsep_procid privsep_process;
* Runtime structures
*/
+struct iked_timer {
+ struct event tmr_ev;
+ struct iked *tmr_env;
+ void (*tmr_cb)(struct iked *, void *);
+ void *tmr_cbarg;
+};
+
struct iked_spi {
u_int64_t spi;
u_int8_t spi_size;
@@ -500,6 +507,10 @@ struct iked {
struct iked_socket *sc_sock4;
struct iked_socket *sc_sock6;
+ struct iked_timer sc_inittmr;
+#define IKED_INITIATOR_INITIAL 2
+#define IKED_INITIATOR_INTERVAL 60
+
struct privsep sc_ps;
};
@@ -644,7 +655,7 @@ pid_t ikev1(struct privsep *, struct privsep_proc *);
/* ikev2.c */
pid_t ikev2(struct privsep *, struct privsep_proc *);
void ikev2_recv(struct iked *, struct iked_message *);
-int ikev2_init_ike_sa(struct iked *, struct iked_policy *);
+void ikev2_init_ike_sa(struct iked *, void *);
int ikev2_sa_negotiate(struct iked_sa *, struct iked_proposals *,
struct iked_proposals *);
int ikev2_policy2id(struct iked_static_id *, struct iked_id *, int);
@@ -737,9 +748,8 @@ char *ca_asn1_name(u_int8_t *, size_t);
char *ca_x509_name(void *);
/* timer.c */
-void timer_register_initiator(struct iked *,
- int (*)(struct iked *, struct iked_policy *));
-void timer_unregister_initiator(struct iked *);
+void timer_register(struct iked_timer *, struct iked *,
+ void (*)(struct iked *, void *), void *, int);
/* proc.c */
void proc_init(struct privsep *, struct privsep_proc *, u_int);