Module loadere (ugly)

FossilOrigin-Name: bc7f59e8b41f31ac0d74d5295eebb7a261d8b65f98b9e176e9b0cb44445f8c30
This commit is contained in:
7u83@mail.ru
2016-02-26 22:30:09 +00:00
parent 756457f2f2
commit f3e471174d
3 changed files with 36 additions and 0 deletions

22
src/mod/modload_ac.c Normal file
View File

@ -0,0 +1,22 @@
#include "../capwap/mod.h"
#include "cipwap/mod_cipwap.h"
#include "capwap/mod_capwap.h"
#define MODS_AC { mod_capwap_ac,mod_cipwap_ac,NULL }
struct mod_ac *(*mods_ac[])() = MODS_AC;
struct mod_ac * modload_ac(const char *name)
{
int i;
for (i=0; mods_ac[i];i++){
struct mod_ac * m = mods_ac[i]();
if (strcmp(m->name,name)==0)
return m;
}
return NULL;
}