Hi,

Those 3 patches, contains the skeleton of IP pool API and a simple use with
private network API.
IP block allocation can be done using __connman_ippool_create(), name and size
are passed to the API.
It returns the connman_pool structure, subnet, start IP and end IP addresses of
the block. Block size over 254 are not managed for the moment.

Example:
private_network_request calls __connman_ippool_create() for a block size of 5,
it returns:
Block range: 192.168.254.1 t0 192.168.254.5
Subnet: 255.255.255.0
and the pool structure.

Next step:
- Define callback type.
- Add callback/datacallback into connman_ippool structure
- Add IP pool API to register callback and data callback.
- Define callback for different IP pool users (private network/DHCP)
  in tethering.
- Add reference over pool.
- Add notification function in order ethernet/wlan interface
  to notify IP pool core that some private addresses are in use.
- Managed multiple block allocation for network/dhcp wih more than 254 clients.

Guillaume Zajac (3):
  ippool: Add IP pool layer
  ippool-test: Add binary to test ippool
  tethering: Use IP pool API with private network

 Makefile.am         |    8 +-
 src/connman.h       |   11 ++
 src/ippool.c        |  207 ++++++++++++++++++++++++++++++++++++
 src/main.c          |    2 +
 src/tethering.c     |   11 ++-
 tools/ippool-test.c |  291 +++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 526 insertions(+), 4 deletions(-)
 create mode 100644 src/ippool.c
 create mode 100644 tools/ippool-test.c

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to