On 01/16/2015 06:07 PM, Adrien Destugues wrote:
It seems it should be possible to move the relevant parts of these classes to libnetwork without having it depend on libbe. As far as I can see:
I would prefer if the high-level network API stayed in libbnetapi, and libnetwork only contains the (mostly) POSIX basics.
[...]
Alternatively, I could move the code to getifaddrs, and implement these classes using getifaddrs instead of sockets/ioctls. This is how it is done for other parts of the libbnetapi currently, but I much prefer writing the implementation in C++ and wrapping it in a C API.
Why not stay with the status quo?The only user of getifaddrs so far is libbind, and that is part of libbnetapi, anyway.
Otherwise, if it's not performance hit, I'd either use getifaddrs() in the C++ code, or pull a private base class out of the C++ API that both implementations use.
Bye, Axel.