Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #796, Update os-impl-no-sockets.c to match APIs #800

Merged
merged 1 commit into from
Feb 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 47 additions & 80 deletions src/os/portable/os-impl-no-sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,157 +42,124 @@
***************************************************************************************/

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketOpen_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketOpen_Impl(uint32 sock_id)
int32 OS_SocketOpen_Impl(const OS_object_token_t *token)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketOpen_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketBind_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketBind_Impl(uint32 sock_id, const OS_SockAddr_t *Addr)
int32 OS_SocketBind_Impl(const OS_object_token_t *token, const OS_SockAddr_t *Addr)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketBind_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketConnect_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketConnect_Impl(uint32 sock_id, const OS_SockAddr_t *Addr, int32 timeout)
int32 OS_SocketConnect_Impl(const OS_object_token_t *token, const OS_SockAddr_t *Addr, int32 timeout)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketConnect_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketAccept_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketAccept_Impl(uint32 sock_id, uint32 connsock_id, OS_SockAddr_t *Addr, int32 timeout)
int32 OS_SocketAccept_Impl(const OS_object_token_t *sock_token, const OS_object_token_t *conn_token,
OS_SockAddr_t *Addr, int32 timeout)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketAccept_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketRecvFrom_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketRecvFrom_Impl(uint32 sock_id, void *buffer, size_t buflen, OS_SockAddr_t *RemoteAddr, int32 timeout)
int32 OS_SocketRecvFrom_Impl(const OS_object_token_t *token, void *buffer, size_t buflen, OS_SockAddr_t *RemoteAddr,
int32 timeout)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketRecvFrom_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketSendTo_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketSendTo_Impl(uint32 sock_id, const void *buffer, size_t buflen, const OS_SockAddr_t *RemoteAddr)
int32 OS_SocketSendTo_Impl(const OS_object_token_t *token, const void *buffer, size_t buflen,
const OS_SockAddr_t *RemoteAddr)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketSendTo_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketGetInfo_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketGetInfo_Impl(uint32 sock_id, OS_socket_prop_t *sock_prop)
int32 OS_SocketGetInfo_Impl(const OS_object_token_t *token, OS_socket_prop_t *sock_prop)
{
return OS_SUCCESS;
} /* end OS_SocketGetInfo_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketAddrInit_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketAddrInit_Impl(OS_SockAddr_t *Addr, OS_SocketDomain_t Domain)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketAddrInit_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketAddrToString_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketAddrToString_Impl(char *buffer, uint32 buflen, const OS_SockAddr_t *Addr)
int32 OS_SocketAddrToString_Impl(char *buffer, size_t buflen, const OS_SockAddr_t *Addr)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketAddrToString_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketAddrFromString_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketAddrFromString_Impl(OS_SockAddr_t *Addr, const char *string)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketAddrFromString_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketAddrGetPort_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketAddrGetPort_Impl(uint16 *PortNum, const OS_SockAddr_t *Addr)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketAddrGetPort_Impl */
}

/*----------------------------------------------------------------
* Implementation for no network configuration
*
* Function: OS_SocketAddrSetPort_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
*
* See prototype for argument/return detail
*-----------------------------------------------------------------*/
int32 OS_SocketAddrSetPort_Impl(OS_SockAddr_t *Addr, uint16 PortNum)
{
return OS_ERR_NOT_IMPLEMENTED;
} /* end OS_SocketAddrSetPort_Impl */
}