Add a function converts interger between host and network byte order

convert values between host and network byte order, return an unsigned interger.