summaryrefslogtreecommitdiff
path: root/other/b-scan/include/bscan/module.h
blob: 3ad316b55bc96a4b2ec10a9b33ef1b3fc601bb2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

#define MAX_MODULES     8

#define MOD_FIRSTPKG	0x00
#define MOD_RCV		0x01

#define RMOD_OK		0x00
#define RMOD_SKIP	0x01
#define RMOD_ERROR	0x02
#define RMOD_ABRT	0x04

struct _mods
{
    int (*init) (char **, int, char **, void *);  /* init the module stuff */
    int (*fini) ();		/* finish the module */
    void (*musage) ();		/* print out usage informations */
    int (*callmdl) (int, void *);	/* call a function */
    const char *modname;	/* name of the module after init */
    int modid;			/* id of the module. who needs this ? */
    char *modarg;		/* arg to module */
};

int add_module (char *, char *);
void split_margs (const char *, char ***, int *);
int loadinit_mod (char *);