Added APIs to find host public and loopback interfaces.

Review: https://reviews.apache.org/r/22593