1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 #if defined SIP_OS_LINUX
11 #include "cpr_linux_types.h"
12 #elif defined SIP_OS_WINDOWS
13 #include "cpr_win_types.h"
14 #elif defined SIP_OS_OSX
15 #include "cpr_darwin_types.h"
18 //#error "Unsupported platform"
33 typedef cpr_status_e cprRC_t
;
36 * IPv4 address structure
38 typedef uint32_t cpr_in_addr_t
;
43 /* can occur with Windows winsock.h */
46 unsigned char s_b1
, s_b2
, sb_b3
, s_b4
;
56 * IPv6 address structure
69 #define s6_addr addr.base8
72 #define s6_addr16 addr.base16
75 #define s6_addr32 addr.base32
80 CPR_IP_ADDR_INVALID
=0,
93 * IP address structure
105 extern const cpr_ip_addr_t ip_addr_invalid
;
107 #define MAX_IPADDR_STR_LEN 48
110 #define CPR_IP_ADDR_INIT(a) a.type = CPR_IP_ADDR_INVALID;
115 * The strings of type string_t are actually very special blocks
116 * of memory that have a "hidden" header block immediately preceding
117 * the pointer. You MUST use the functions in string_lib.c to
118 * create, manipulate, destroy, copy, or otherwise work with these
122 typedef const char *string_t
;