There should be a way of getting the network mask...

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

There should be a way of getting the network mask...

Post by DoubleDutch »

There should be a way of (natively) returning the mask that is available for an IP address, eg:

Code: Select all

ip=NextIPAddress()
mask=IPMask()
From these two values we can calculate broadcast and this is really usefull in autodetecting a server on a network:

Code: Select all

broadcast=(mask!$ffffffff)|ip
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system