[NET] CORE: Use htons() where appropriate.