Created some address conversion functions that will be used by the networking project to reduce code duplication.