-
Notifications
You must be signed in to change notification settings - Fork 216
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 #1398, separate bind and listen calls for streams #1399
Conversation
Add OS_SocketBindAddress() and OS_SocketListen() to allow users to bind an address without also calling listen(). The use case is for client side connections where the source port needs to be controlled.
* See description in API and header file for detail | ||
* | ||
*-----------------------------------------------------------------*/ | ||
int32 OS_SocketBindAddress(osal_id_t sock_id, const OS_SockAddr_t *Addr) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* Generated stub function for OS_SocketBindAddress() | ||
* ---------------------------------------------------- | ||
*/ | ||
int32 OS_SocketBindAddress(osal_id_t sock_id, const OS_SockAddr_t *Addr) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* See description in API and header file for detail | ||
* | ||
*-----------------------------------------------------------------*/ | ||
int32 OS_SocketListen(osal_id_t sock_id) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* Generated stub function for OS_SocketListen() | ||
* ---------------------------------------------------- | ||
*/ | ||
int32 OS_SocketListen(osal_id_t sock_id) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* See prototype for argument/return detail | ||
* | ||
*-----------------------------------------------------------------*/ | ||
int32 OS_SocketListen_Impl(const OS_object_token_t *token) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -214,16 +214,14 @@ | |||
* See prototype for argument/return detail | |||
* | |||
*-----------------------------------------------------------------*/ | |||
int32 OS_SocketBind_Impl(const OS_object_token_t *token, const OS_SockAddr_t *Addr) | |||
int32 OS_SocketBindAddress_Impl(const OS_object_token_t *token, const OS_SockAddr_t *Addr) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
*Combines:* cFE v7.0.0-rc4+dev356 osal v6.0.0-rc4+dev223 **Includes:** *cFE* - nasa/cFE#2416 *osal* - nasa/osal#1397 - nasa/osal#1399 Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
*Combines:* cFE v7.0.0-rc4+dev356 osal v6.0.0-rc4+dev223 **Includes:** *cFE* - nasa/cFE#2416 *osal* - nasa/osal#1397 - nasa/osal#1399 Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
Checklist (Please check before submitting)
Describe the contribution
Add OS_SocketBindAddress() and OS_SocketListen() to allow users to bind an address without also calling listen(). The use case is for client side connections where the source port needs to be controlled.
Fixes #1398
Testing performed
Steps taken to test the contribution:
Expected behavior changes
Users can call
OS_SocketBindAddress()
to bind a specific port/address for client-side connectionsSystem(s) tested on
Debian
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.