IP Calculator Final Version
alex at tweedly.net
Mon Jan 26 15:14:54 EST 2015
On 26/01/2015 15:47, Bob Sneidar wrote:
> Hi all.
> Mike Doub has offered to include this in the MasterLibrary, so I went through and added what I think is fairly comprehensive error checking to make sure that bogus input values return a descriptive error message. If any of you feel so inclined, please try to make it fail using incorrect input values. Also make sure that it returns the correct values for correct input values.
> I have already done this but as you are well aware, developers can easily miss things others can see.
> Bob S
A couple of error cases that aren't caught gracefully
One that is accepted and shouldn't be
192.168.1.1/24. (note the trailing ".")
Also, not sure why you limit CIDRDepth to between 1 and 30. RFC 4632
specifically says between 0 and 3 - and indeed host routes (/32s) are
common enough, as is default route.
Thanks again for contributing this Bob.
More information about the Use-livecode