Lines Matching defs:conf
191 struct config *conf;
231 conf = (struct config *)malloc(sizeof(*conf));
232 if (conf == NULL)
234 memset(conf, 0, sizeof(*conf));
237 conf->permit = 1;
239 conf->permit = 0;
242 conf->permit = 0;
245 if (prefix_set(token[0], &conf->match, 1) < 0)
247 if (prefix_set(token[2], &conf->dest, 1) < 0)
250 if (prefix_set(token[3], &conf->src, 0) < 0)
254 return conf;
257 free(conf);
266 struct config *conf, *p;
280 conf = config_load1(buf);
281 if (conf) {
282 p->next = conf;
294 config_show1(const struct config *conf)
298 p = prefix_string(&conf->match);
301 if (conf->permit)
306 p = prefix_string(&conf->dest);
315 struct config *conf;
317 for (conf = config_list; conf; conf = conf->next)
318 config_show1(conf);
325 static struct config conf;
328 if (sa1->sa_len > sizeof(conf.match.a) ||
329 sa2->sa_len > sizeof(conf.dest.a))
332 memset(&conf, 0, sizeof(conf));
334 conf.permit = 1;
335 memcpy(&conf.match.a, sa1, sa1->sa_len);
336 memcpy(&conf.dest.a, sa2, sa2->sa_len);
337 return &conf;