The friendly Operating System for the Internet of Things
bytes.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef BYTES_H
21 #define BYTES_H
22 
23 #include "byteorder.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
40 #ifndef htonl
41 #define htonl(hostlong) HTONL(hostlong)
42 #endif
43 
55 #ifndef htons
56 #define htons(hostshort) HTONS(hostshort)
57 #endif
58 
70 #ifndef ntohl
71 #define ntohl(netlong) NTOHL(netlong)
72 #endif
73 
85 #ifndef ntohs
86 #define ntohs(netshort) NTOHS(netshort)
87 #endif
88 
89 typedef size_t socklen_t;
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif /* BYTES_H */
96 
size_t socklen_t
socket address length
Definition: bytes.h:89
Functions to work with different byte orders.