If your host order matches net order (or not), the macros generally do nothing (or all the right things).
In other words, where you apply the macros, is logically the same regardless of the host order.
The goal is portability. Using the macros all the time makes the code more portable, and relieves the programmer (or code reader) of needing to know the hosts order.
example: reporting a_hostname in both digi-dot form and in hex network order.
std::cout << "a_hostname '" << a_hostname << "' maps to "
<< target_host_digi_dot
<< " (" << std::hex << std::setfill('0')
<< ntohl(ret_addr.sin_addr.s_addr) << ")"
<< std::endl;
Similar example -
// ////////////////////////////////////////////////////////////////
// returns previous sin_addr in Host Byte Order
// sets sockaddr_in.sin_addr to Network Byte Order, digi-dot
// is already NBO
uint32_t DTB::SockaddrIn::setSinNboAddr(std::string
a_nboDigiDotHostnameStr)
{
// hbo = convert (nbo)
uint32_t retVal = ntohl(sin_addr.s_addr);
//
int status = inet_aton(a_nboDigiDotHostnameStr.c_str(), &sin_addr);
if(0 == status) // NOTE: 0 when failure! unusual
throw(a_nboDigiDotHostnameStr);
return (retVal);
}