1 /* $OpenBSD: init.c,v 1.17 2001/07/06 14:37:11 ho Exp $ */ 2 /* $EOM: init.c,v 1.25 2000/03/30 14:27:24 ho Exp $ */ 3 4 /* 5 * Copyright (c) 1998, 1999, 2000 Niklas Hallqvist. All rights reserved. 6 * Copyright (c) 2000 Angelos D. Keromytis. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 3. All advertising materials mentioning features or use of this software 17 * must display the following acknowledgement: 18 * This product includes software developed by Ericsson Radio Systems. 19 * 4. The name of the author may not be used to endorse or promote products 20 * derived from this software without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34 /* 35 * This code was written under funding by Ericsson Radio Systems. 36 */ 37 38 /* XXX This file could easily be built dynamically instead. */ 39 40 #include "sysdep.h" 41 42 #include "app.h" 43 #include "cert.h" 44 #include "conf.h" 45 #include "connection.h" 46 #include "doi.h" 47 #include "exchange.h" 48 #include "init.h" 49 #include "ipsec.h" 50 #include "isakmp_doi.h" 51 #include "libcrypto.h" 52 #include "log.h" 53 #include "math_group.h" 54 #include "sa.h" 55 #include "timer.h" 56 #include "transport.h" 57 #include "udp.h" 58 #include "ui.h" 59 60 #ifdef USE_POLICY 61 #include "policy.h" 62 #endif 63 64 void 65 init (void) 66 { 67 log_init (); 68 app_init (); 69 doi_init (); 70 exchange_init (); 71 group_init (); 72 ipsec_init (); 73 isakmp_doi_init (); 74 libcrypto_init (); 75 76 tzset (); 77 78 timer_init (); 79 80 /* The following group are depending on timer_init having run. */ 81 conf_init (); 82 connection_init (); 83 84 #ifdef USE_POLICY 85 /* policy_init depends on conf_init having run. */ 86 policy_init (); 87 #endif 88 89 /* Depends on conf_init and policy_init having run */ 90 cert_init (); 91 92 sa_init (); 93 transport_init (); 94 udp_init (); 95 ui_init (); 96 } 97