diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-04-05 20:58:29 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-04-05 20:58:29 +0000 |
commit | 0fff68e2b753923bdbc01fe82e4815e4d96da2e1 (patch) | |
tree | dc9b429fb29e7f7d2629ea9d890eba0dca6dec49 /sbin/isakmpd/exchange.h | |
parent | dc3d6607c84b70838bc5c380163dad5e5c488961 (diff) |
Merge with EOM 1.21
New finalize API so we can call it when failing too, so we do not leak
resources. Plug memory leaks in general. More memory allocation error
reporting.
Diffstat (limited to 'sbin/isakmpd/exchange.h')
-rw-r--r-- | sbin/isakmpd/exchange.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sbin/isakmpd/exchange.h b/sbin/isakmpd/exchange.h index 8b108334386..350274ce030 100644 --- a/sbin/isakmpd/exchange.h +++ b/sbin/isakmpd/exchange.h @@ -1,5 +1,5 @@ -/* $OpenBSD: exchange.h,v 1.7 1999/04/02 01:08:41 niklas Exp $ */ -/* $EOM: exchange.h,v 1.20 1999/04/02 00:39:58 niklas Exp $ */ +/* $OpenBSD: exchange.h,v 1.8 1999/04/05 20:58:28 niklas Exp $ */ +/* $EOM: exchange.h,v 1.21 1999/04/05 07:59:37 niklas Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -69,9 +69,11 @@ struct exchange { /* * A function with a polymorphic argument called after the exchange - * has been run to its end, successfully. + * has been run to its end, successfully. The 2nd argument is true + * if the finalization hook is called due to the exchange not running + * to its end normally. */ - void (*finalize) (void *); + void (*finalize) (void *, int); void *finalize_arg; /* When several SA's are being negotiated we keep them here. */ @@ -163,11 +165,12 @@ extern int exchange_add_certs (struct message *); extern void exchange_finalize (struct message *); extern void exchange_free (struct exchange *); extern void exchange_free_aca_list (struct exchange *); -extern void exchange_establish (char *name, void (*) (void *), void *); +extern void exchange_establish (char *name, void (*) (void *, int), void *); extern void exchange_establish_p1 (struct transport *, u_int8_t, u_int32_t, - char *, void *, void (*) (void *), void *); + char *, void *, void (*) (void *, int), + void *); extern void exchange_establish_p2 (struct sa *, u_int8_t, char *, void *, - void (*) (void *), void *); + void (*) (void *, int), void *); extern int exchange_gen_nonce (struct message *, size_t); extern void exchange_init (void); extern struct exchange *exchange_lookup (u_int8_t *, int); |