The following list of macros are used to convert between host representation and network byte order.
Macros | |
#define | _htonl(m) (uint32)(((uint32)(m << 24)) | ((uint32)((m & 0x0000FF00) << 8)) | ((uint32)((m & 0x00FF0000) >> 8)) | ((uint32)(((uint32)m) >> 24))) |
#define | _htonl(m) (uint32)(((uint32)(m << 24)) | ((uint32)((m & 0x0000FF00) << 8)) | ((uint32)((m & 0x00FF0000) >> 8)) | ((uint32)(((uint32)m) >> 24))) |
#define | _htons(A) (uint16)((((uint16) (A)) << 8) | (((uint16) (A)) >> 8)) |
#define | _htons(A) (uint16)((((uint16) (A)) << 8) | (((uint16) (A)) >> 8)) |
#define | _ntohl _htonl |
#define | _ntohl _htonl |
#define | _ntohs _htons |
#define | _ntohs _htons |
#define _htonl | ( | m | ) | (uint32)(((uint32)(m << 24)) | ((uint32)((m & 0x0000FF00) << 8)) | ((uint32)((m & 0x00FF0000) >> 8)) | ((uint32)(((uint32)m) >> 24))) |
Convert a 4-byte integer from Host representation to Network byte order (Host is LE).
Referenced by IperfSocketEventHandler(), IperfTCP_ClientStart(), IperfUDP_ClientStart(), IperfUDP_SendTestPacket(), IperfUDP_WriteFIN(), and main().
#define _htonl | ( | m | ) | (uint32)(((uint32)(m << 24)) | ((uint32)((m & 0x0000FF00) << 8)) | ((uint32)((m & 0x00FF0000) >> 8)) | ((uint32)(((uint32)m) >> 24))) |
Convert a 4-byte integer from the host representation to the Network byte order representation.
Convert a 2-byte integer (short) from Host representation to Network byte order (Host is LE).
Referenced by AppServerCb(), connect_cmd_handler(), connect_to_server(), ConnectNetwork(), demo_start(), handle_start_connect(), http_client_send_request(), http_client_socket_resolve_handler(), iot_tls_connect(), IperfSocketEventHandler(), IperfStart(), IperfTCP_ClientStart(), IperfTCP_ServerStart(), IperfUDP_ClientStart(), IperfUDP_ServerStart(), m2m_ssl_retrieve_next_for_verifying(), main(), setup_android_sockets(), smtpConnect(), sslConnect(), test_init(), and wifi_ap_provision().
Convert a 2-byte integer (short) from the host representation to the Network byte order representation.
#define _ntohl _htonl |
Convert a 4-byte integer from Network byte order to Host representation.
Referenced by IperfSocketEventHandler().
#define _ntohl _htonl |
Convert a 4-byte integer from the Network byte order representation to the host representation .
#define _ntohs _htons |
Convert a 2-byte integer from Network byte order to Host representation.
Referenced by IperfSocketEventHandler().