Changeset 858fc90 in mainline for uspace/srv/net/include/byteorder.h
- Timestamp:
- 2010-03-15T19:35:25Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6092b56e
- Parents:
- 92307f1 (diff), 4684368 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/include/byteorder.h
r92307f1 r858fc90 42 42 43 43 44 /** Converts the given short number ( 16 bit ) from the host byte order to the network byte order ( big endian).44 /** Converts the given short number (16 bit) from the host byte order to the network byte order (big endian). 45 45 * @param[in] number The number in the host byte order to be converted. 46 46 * @returns The number in the network byte order. 47 47 */ 48 #define htons( number ) host2uint16_t_be( number)48 #define htons(number) host2uint16_t_be(number) 49 49 50 /** Converts the given long number ( 32 bit ) from the host byte order to the network byte order ( big endian).50 /** Converts the given long number (32 bit) from the host byte order to the network byte order (big endian). 51 51 * @param[in] number The number in the host byte order to be converted. 52 52 * @returns The number in the network byte order. 53 53 */ 54 #define htonl( number ) host2uint32_t_be( number)54 #define htonl(number) host2uint32_t_be(number) 55 55 56 /** Converts the given short number ( 16 bit ) from the network byte order ( big endian) to the host byte order.56 /** Converts the given short number (16 bit) from the network byte order (big endian) to the host byte order. 57 57 * @param[in] number The number in the network byte order to be converted. 58 58 * @returns The number in the host byte order. 59 59 */ 60 #define ntohs( number ) uint16_t_be2host( number)60 #define ntohs(number) uint16_t_be2host(number) 61 61 62 /** Converts the given long number ( 32 bit ) from the network byte order ( big endian) to the host byte order.62 /** Converts the given long number (32 bit) from the network byte order (big endian) to the host byte order. 63 63 * @param[in] number The number in the network byte order to be converted. 64 64 * @returns The number in the host byte order. 65 65 */ 66 #define ntohl( number ) uint32_t_be2host( number)66 #define ntohl(number) uint32_t_be2host(number) 67 67 68 68 #endif
Note:
See TracChangeset
for help on using the changeset viewer.