local-ip-address
local-ip-address copied to clipboard
Feature Request: Determining Netmask
This may be a feature already, I just couldn't find anything in the docs. Is there anyway to get the netmask of the ip? I am currently using this for a project to determine the UDP broadcast ip:
10 .0 .0 .5 // ip
255 .255 .255 .0 // netmask
----------------
10 .0 .0 .255 // broadcast
In most networks, I can assume the broadcast ip is just the last digit changed to 255, however if the netmask is changed, then so is the broadcast:
10 .0 .0 .5 // ip
255 .255 .0 .0 // netmask
----------------
10 .0 .255 .255 // broadcast
Hey @JustBobinAround!
Thanks so much for openning this issue!
I think this is a great addition to this library, do you feel like giving it a try?