On Wed, 26 May 2021 at 23:56, Denis Kenzior wrote: > > Again, convenience, readability, better fit for the use case. But > > readability? Yeah I don't buy that one ;) If you can write ret_val = ip_pool_select_addr4(...); do_some_maths(ret_val->addr) instead of: struct in_addr ia; char addr[INET_ADDRSTRLEN]; ret_val = ip_pool_select_addr4(...); if (!l_rtnl_address_get_address(ret_val, addr) || inet_aton(addr, &ia) < 0) { l_rtnl_address_free(ret_val); goto error; } do_some_maths(ntohl(ia.s_addr)); I call that readable vs. unreadable ;-) > You were doing stuff like storing the > ip address in host order for whatever reason. And you expect someone reading > ap.c to remember / know that? Whenever you're going to store the IP as an uint32_t (rather than e.g. in_addr) it's probably because you want to do some arithmetics and you'll want the host byte order. Besides you can generally assume that a plain integer variable is in host byte order. Best regards