Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sock.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2016 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ESP8266_SOCK_H
18 #define ESP8266_SOCK_H
19 
20 #include <lwip/lwip/sockets.h>
21 
22 typedef int kaa_fd_t;
23 
24 typedef struct sockaddr kaa_sockaddr_t;
25 typedef struct sockaddr_in kaa_sockaddr_storage_t;
26 typedef socklen_t kaa_socklen_t;
27 
28 
29 #define KAA_HTONS(a) htons((a))
30 #define KAA_HTONL(a) htonl((a))
31 #define KAA_HTONLL(a) kaa_htonll((a))
32 
33 #define KAA_NTOHS(a) ntohs((a))
34 #define KAA_NTOHL(a) ntohl((a))
35 #define KAA_NTOHLL(a) kaa_ntohll((a))
36 #endif /* ESP8266_SOCK_H */
struct sockaddr kaa_sockaddr_t
Definition: sock.h:76
socklen_t kaa_socklen_t
Definition: sock.h:78
int kaa_fd_t
Definition: sock.h:74
Definition: sock.h:67