#include #include #include "config.h" #include "structs.h" extern MAP_OPS map_ops_trivial; static int map_trivial_add(CONFIG *cfg, LISTEN *l, const char *key, int keylen, const char *rest) { MAP *map; if ((keylen != 7) || bcmp(key,"trivial",7)) return(0); if (*rest) config_err(cfg,"trailing junk on `map trivial' listen line"); map = malloc(sizeof(MAP)); map->ops = &map_ops_trivial; map->priv = 0; map->link = l->mappings; l->mappings = map; return(1); } static void map_trivial_free(void *pv) { if (pv) abort(); } MAP_OPS map_ops_trivial = MAP_OPS_INIT(trivial);