1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* signet: key = value configuration shared by signet-api, signetd and pim-api */
#ifndef SIGNET_CONF_H
#define SIGNET_CONF_H
#define CONF_MAX 96
#define CONF_PATH_DEFAULT "/etc/signet/signet.conf"
struct conf {
char *keys[CONF_MAX];
char *vals[CONF_MAX];
int n;
};
int conf_load(struct conf *, const char *path);
const char *conf_get(const struct conf *, const char *key, const char *def);
/* 1 if any item of comma/space separated list `a` appears in list `b` */
int list_intersects(const char *a, const char *b);
int list_has(const char *list, const char *item);
#endif