Skip to content

[ESP8266WiFiSTA] Add get broadcast IP address functionality #6196

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

a7md0
Copy link

@a7md0 a7md0 commented Jun 11, 2019

Calculate the broadcast IP address using the subnet mask and default gateway IP address.

a7md0 added 2 commits June 11, 2019 11:12
Update ESP8266WiFiSTA.h | Add broadcastIP()
Calculate the broadcast IP address using the subnet mask and default gateway IP address.
Copy link
Collaborator

@devyte devyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like generic network calcs. I think it is therefore also applicable to the AP interface, in whichncasenit shouldn't be in the STA class.

@a7md0
Copy link
Author

a7md0 commented Jul 12, 2019

This looks like generic network calcs. I think it is therefore also applicable to the AP interface, in whichncasenit shouldn't be in the STA class.

It would be great if you redirected me to the "generic network class" to add this code.

@d-a-v
Copy link
Collaborator

d-a-v commented Jul 12, 2019

I think what @devyte meant was to move your function into ESP8266WiFiGeneric.cpp with a parameter (the interface index STATION_IF or SOFTAP_IF), and add a call to this function from both ESP8266WiFiSTA and ESP8266WiFiAP with the matching interface index.

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 this pull request may close these issues.

3 participants