• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 12.0.1.79
GD_C_netdb.h
Go to the documentation of this file.
1 /*
2  * (c) 2017 BlackBerry Limited. All Right Reserved.
3  */
4 
5 #pragma once
6 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #ifndef GD_C_API
16 # if !defined(_WIN32)
17 # define GD_C_API __attribute__((visibility("default")))
18 # else
19 # define GD_C_API
20 # endif
21 #endif
22 
23 #include <netdb.h>
24 #include <sys/types.h>
25 #include <sys/socket.h>
26 
33 {
38 
42 
47 
51 
55 
56 };
57 
60 GD_C_API struct hostent* GD_gethostbyname(const char* name);
61 
64 GD_C_API int GD_getaddrinfo(const char* node,
65  const char* service,
66  const struct addrinfo* hints,
67  struct addrinfo** addresses);
68 
71 GD_C_API int GD_freeaddrinfo(struct addrinfo* ai);
72 
75 GD_C_API int GD_getnameinfo(const struct sockaddr* address, socklen_t addressLength,
76  char* node, size_t nodeLength,
77  char* service, size_t serviceLength,
78  int flags);
79 
80 
97 GD_C_API enum GD_ROUTE GD_getRouteInfo(const struct sockaddr* address);
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
GD_ROUTE
GD_ROUTE
Route information constants.
Definition: GD_C_netdb.h:32
GD_ROUTE_DENY
@ GD_ROUTE_DENY
The connection will be denied via the BlackBerry Dynamics SDK.
Definition: GD_C_netdb.h:50
GD_getaddrinfo
int GD_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **addresses)
C API.
GD_ROUTE_INTERNET_LISTED
@ GD_ROUTE_INTERNET_LISTED
The connection will be routed direct to the Internet per WhiteList.
Definition: GD_C_netdb.h:54
GD_getnameinfo
int GD_getnameinfo(const struct sockaddr *address, socklen_t addressLength, char *node, size_t nodeLength, char *service, size_t serviceLength, int flags)
C API.
GD_ROUTE_UNKNOWN
@ GD_ROUTE_UNKNOWN
The connection information didn't include BlackBerry Dynamics routing information.
Definition: GD_C_netdb.h:37
GD_getRouteInfo
enum GD_ROUTE GD_getRouteInfo(const struct sockaddr *address)
Check if routing is via the BlackBerry Dynamics infrastructure.
GD_gethostbyname
struct hostent * GD_gethostbyname(const char *name)
C API.
GD_ROUTE_INTERNET
@ GD_ROUTE_INTERNET
The connection will be routed direct to the Internet.
Definition: GD_C_netdb.h:41
GD_ROUTE_GOOD_PROXY
@ GD_ROUTE_GOOD_PROXY
The connection will be routed via the BlackBerry Dynamics infrastructure.
Definition: GD_C_netdb.h:46
GD_freeaddrinfo
int GD_freeaddrinfo(struct addrinfo *ai)
C API.