The corresponding C type for android.net.Network#getNetworkHandle() return values. The Java signed long value can be safely cast to a net_handle_t:
Perform hostname resolution via the DNS servers associated with |network|.
Binds the current process to |network|. All sockets created in the future (and not explicitly bound via android_setsocknetwork()) will be bound to |network|. All host name resolutions will be limited to |network| as well. Note that if the network identified by |network| ever disconnects, all sockets created in this way will cease to work and all host name resolutions will fail. This is by design so an application doesn't accidentally use sockets it thinks are still bound to a particular network.
Set the network to be used by the given socket file descriptor.
The value NETWORK_UNSPECIFIED indicates no specific network.