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

Socket API needs method to control source port for TCP client #1398

Closed
jphickey opened this issue Jul 26, 2023 · 0 comments · Fixed by #1399
Closed

Socket API needs method to control source port for TCP client #1398

jphickey opened this issue Jul 26, 2023 · 0 comments · Fixed by #1399
Milestone

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The bind() call could be used on a client-side role (without listen()) to control the source port for outgoing TCP connections.

The OS_SocketBind() API assumes a server-side role, in that it does both a bind() and listen() call underneath.

Currently, the OSAL API does not have any way to control the port used for a TCP connection on the client side.

Describe the solution you'd like
Introduce a method that can be used to control the source port used for client-side connections

For example: OS_SocketBindClient() and OS_SocketBindServer() (retaining existing OS_SocketBind for compatibility)

Describe alternatives you've considered
This could potentially be done in OS_SocketConnect, such as OS_SocketConnectWithSourcePort() ... but keeping it in bind keeps it more closely related to standard sockets API.

Additional context
This must be done with only new functions, cannot change definition of current OS_SocketBind.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

github-actions bot pushed a commit that referenced this issue Jul 27, 2023
Fix #1398, separate bind and listen calls for streams
@chillfig chillfig added this to the Equuleus milestone Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants