htonl is defined in winsock.h.
htonl
winsock.h
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.