From 524518261009f3f81febfdd8398becc4a80cc941 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 27 Aug 2000 07:47:46 +0000 Subject: Patch-o-matic! now included. --- include/libippool/ip_pool_support.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 include/libippool/ip_pool_support.h (limited to 'include') diff --git a/include/libippool/ip_pool_support.h b/include/libippool/ip_pool_support.h new file mode 100644 index 00000000..4a87f026 --- /dev/null +++ b/include/libippool/ip_pool_support.h @@ -0,0 +1,26 @@ +/* support function prototypes for IP pool management (config file, mostly) */ +#ifndef _IP_POOL_SUPPORT_H +#define _IP_POOL_SUPPORT_H + +#include +#include +#include + +#ifndef IPPOOL_CONF +#define IPPOOL_CONF "/etc/ippool.conf" +#endif + +/* called just to draw in this support .o */ +void ip_pool_init(void); + +/* given a pool name (or number), return pool index, possibly reading .conf */ +ip_pool_t ip_pool_get_index(char *name); + +/* given a pool index, and a buffer to store a name, search for the index + * in the .conf file, and give the textual name, if present; if not, the + * numeric index is returned. If numeric_flag == 1, the numeric index is + * always returned + */ +char *ip_pool_get_name(char *buf, int size, ip_pool_t index, int numeric_flag); + +#endif /*_IP_POOL_SUPPORT_H*/ -- cgit v1.2.3