]> git.ipfire.org Git - people/ms/strongswan.git/blob - src/libstrongswan/plugins/chapoly/chapoly_drv.c
e07e51488879a439c632a05b7ce22c7dbd57ebb2
[people/ms/strongswan.git] / src / libstrongswan / plugins / chapoly / chapoly_drv.c
1 /*
2 * Copyright (C) 2015 Martin Willi
3 * Copyright (C) 2015 revosec AG
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 #include "chapoly_drv.h"
17 #include "chapoly_drv_portable.h"
18
19 typedef chapoly_drv_t*(*chapoly_drv_create)();
20
21 /**
22 * See header.
23 */
24 chapoly_drv_t *chapoly_drv_probe()
25 {
26 chapoly_drv_create drivers[] = {
27 chapoly_drv_portable_create,
28 };
29 chapoly_drv_t *driver;
30 int i;
31
32 for (i = 0; i < countof(drivers); i++)
33 {
34 driver = drivers[i]();
35 if (driver)
36 {
37 return driver;
38 }
39 }
40 return NULL;
41 }