net: Add functions to return connection status needed in TCP

These are internal functions needed when initiating a TCP
connection.

Change-Id: Ide5d59ac9854ec8bdea3baa97b3cde3ffa6a5e0f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2016-04-05 10:47:05 +03:00
commit 662ce340be
3 changed files with 88 additions and 0 deletions

View file

@ -143,6 +143,19 @@ int net_recv(struct net_buf *buf);
void net_context_init(void);
/**
* @brief Get current status of the TCP connection.
*
* @details Application can call this to get the current status
* of TCP connection. The returned value maps to errno values.
* Value 0 means ok. For UDP context 0 is always returned.
*
* @param context Network context
*
* @return 0 if ok, < 0 connection status
*/
int net_context_get_connection_status(struct net_context *context);
#ifdef __cplusplus
}
#endif