1/* support function prototypes for IP pool management (config file, mostly) */
2#ifndef _IP_POOL_SUPPORT_H
3#define _IP_POOL_SUPPORT_H
4
5#include <iptables.h>
6#include <linux/netfilter_ipv4/ip_conntrack.h>
7#include <linux/netfilter_ipv4/ip_pool.h>
8
9#ifndef IPPOOL_CONF
10#define IPPOOL_CONF "/etc/ippool.conf"
11#endif
12
13/* called just to draw in this support .o */
14void ip_pool_init(void);
15
16/* given a pool name (or number), return pool index, possibly reading .conf */
17ip_pool_t ip_pool_get_index(char *name);
18
19/* given a pool index, and a buffer to store a name, search for the index
20 * in the .conf file, and give the textual name, if present; if not, the
21 * numeric index is returned. If numeric_flag == 1, the numeric index is
22 * always returned
23 */
24char *ip_pool_get_name(char *buf, int size, ip_pool_t index, int numeric_flag);
25
26#endif /*_IP_POOL_SUPPORT_H*/
27