Libecoli
0.11.5
Extensible COmmand LIne library
Toggle main menu visibility
Loading...
Searching...
No Matches
ip_pool.h
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright 2025, Olivier MATZ <zer0@droids-corp.org>
3
*/
4
5
/* A very simple IP pool. */
6
7
#include <stdint.h>
8
9
struct
ec_strvec
;
10
struct
ip_pool;
11
struct
ip_address;
12
13
/* create htable of ip pools */
14
int
ip_pool_init(
void
);
15
16
/* free ip pools */
17
void
ip_pool_exit(
void
);
18
19
/* create an ip pool */
20
struct
ip_pool *ip_pool(
const
char
*name);
21
22
/* lookup for an ip pool, by name */
23
struct
ip_pool *ip_pool_lookup(
const
char
*name);
24
25
/* list ip pool names */
26
struct
ec_strvec
*ip_pool_list(
void
);
27
28
/* destroy the ip pool */
29
void
ip_pool_free(
const
char
*name);
30
31
/* add an IP */
32
int
ip_pool_addr_add(
struct
ip_pool *pool,
const
char
*addr);
33
34
/* del an IP */
35
int
ip_pool_addr_del(
struct
ip_pool *pool,
const
char
*addr);
36
37
/* list pool IP addresses */
38
struct
ec_strvec
*ip_pool_addr_list(
const
struct
ip_pool *pool);
ec_strvec
struct ec_strvec * ec_strvec(void)
examples
pool-editline
ip_pool.h
Generated by
1.17.0