+/**
+ * @brief Error information from CA
+ * contains error code and message information
+ *
+ * This structure holds error information
+ */
+typedef struct
+{
+ CAResult_t result; /**< CA API request result */
+ CAInfo_t info; /**< message information such as token and payload data
+ helpful to identify the error */
+} CAErrorInfo_t;
+
+/**
+ * @brief CA Remote Access information for XMPP Client
+ *
+ */
+typedef struct
+{
+ char *hostname; /**< XMPP server hostname */
+ uint16_t port; /**< XMPP server serivce port */
+ char *xmpp_domain; /**< XMPP login domain */
+ char *username; /**< login username */
+ char *password; /**< login password */
+ char *resource; /**< specific resource for login */
+ char *user_jid; /**< specific JID for login */
+} CARAInfo_t;
+
+
+/**
+ * @brief Hold global variables for CA layer (also used by RI layer)
+ */
+typedef struct
+{
+ int fd;
+ uint16_t port;
+} CASocket_t;
+
+typedef struct
+{
+ CATransportFlags_t clientFlags;
+ CATransportFlags_t serverFlags;
+ bool client;
+ bool server;
+
+ struct sockets
+ {
+ void *threadpool; // threadpool between Initialize and Start
+ CASocket_t u6; // unicast IPv6
+ CASocket_t u6s; // unicast IPv6 secure
+ CASocket_t u4; // unicast IPv4
+ CASocket_t u4s; // unicast IPv4 secure
+ CASocket_t m6; // multicast IPv6
+ CASocket_t m6s; // multicast IPv6 secure
+ CASocket_t m4; // multicast IPv4
+ CASocket_t m4s; // multicast IPv4 secure
+ int netlinkFd; // netlink
+ int shutdownFds[2]; // shutdown pipe
+ int selectTimeout; // in seconds
+ int maxfd; // highest fd (for select)
+ int numInterfaces; // number of active interfaces
+ bool started; // the IP adapter has started
+ bool terminate; // the IP adapter needs to stop
+ bool ipv6enabled; // IPv6 enabled by OCInit flags
+ bool ipv4enabled; // IPv4 enabled by OCInit flags
+ } ip;
+
+ struct calayer
+ {
+ CATransportFlags_t previousRequestFlags; // address family filtering
+ uint16_t previousRequestMessageId; // address family filtering
+ } ca;
+} CAGlobals_t;
+
+extern CAGlobals_t caglobals;
+