I just use the ntohl(), htonl(), ntohs(), htons() functions.
Is there a reason you can't use them?