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

WIZNET5K instances store a single source port but these are assigned per socket. #120

Open
BiffoBear opened this issue Jun 21, 2023 · 0 comments

Comments

@BiffoBear
Copy link
Contributor

The WIZNET5K driver stores a single value for a source port as an instance variable. Source ports are set per hardware socket before each socket is opened.
I don't think this should be an instance variable, but should be an attribute of the socket_open method. The 'port' attribute can default to 0 so that a random port is still assigned if no port is specified.

eth.socket_open(socket_number, port=68, conn_mode=SNMR_TCP)

is more intuitive and less prone to error than

eth.src_port = 68
eth.socket_open(socket_number, conn_mode=SNMR_TCP)
eth.src_port = 0
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

No branches or pull requests

1 participant