Endianness conversion functions for Network data. More...
|
Functions | |
| __INLINE uint32_t | co_htonl (uint32_t hostlong) |
| Convert host to network long word. | |
| __INLINE uint16_t | co_htons (uint16_t hostshort) |
| Convert host to network short word. | |
| __INLINE uint32_t | co_ntohl (uint32_t netlong) |
| Convert network to host long word. | |
| __INLINE uint16_t | co_ntohs (uint16_t netshort) |
| Convert network to host short word. | |
Endianness conversion functions for Network data.
Converts values between the local system and big-endian network data (e.g. IP, Ethernet, but NOT WLAN).
The host term in the descriptions of these functions refers to the local system, i.e. application or embedded system. Therefore, these functions will behave differently depending on which side they are used. The reason of this terminology is to keep the same name than the standard C function.
Behavior will depends on the endianness of the host:
| __INLINE uint32_t co_htonl | ( | uint32_t | hostlong | ) |
Convert host to network long word.
| [in] | hostlong | Long word value to convert. |
Definition at line 103 of file co_endian.h.
References co_bswap32().
Referenced by co_ntohl().
| __INLINE uint16_t co_htons | ( | uint16_t | hostshort | ) |
Convert host to network short word.
| [in] | hostshort | Short word value to convert. |
Definition at line 120 of file co_endian.h.
References co_bswap16().
Referenced by co_ntohs(), rxu_cntrl_mac2eth_update(), and txu_cntrl_amsdu_hdr_append().
| __INLINE uint32_t co_ntohl | ( | uint32_t | netlong | ) |
Convert network to host long word.
| [in] | netlong | Long word value to convert. |
Definition at line 137 of file co_endian.h.
References co_htonl().
| __INLINE uint16_t co_ntohs | ( | uint16_t | netshort | ) |
Convert network to host short word.
| [in] | netshort | Short word value to convert. |
Definition at line 150 of file co_endian.h.
References co_htons().
Referenced by me_sta_add_req_handler(), mm_set_vif_state_cfm_handler(), txu_cntrl_llc_hdr_append(), txu_cntrl_mac_hdr_append(), txu_cntrl_sec_hdr_append(), txu_cntrl_sechdr_len_compute(), and txu_cntrl_umacdesc_prep().
1.6.1