Could you Use a Xojo Subnet Calculator Class?

I am taking a quick poll if there are those out there that would find a Xojo Subnet Calculator and IP Address Range Validator Class helpful? I have it written for my app and I will make it “other user friendly” if there is interest.

Thanks
Mike

I could use that.
Thanks in advance.

Cool I am creating a Demo Wrapper App to show off some of the class methods/functions.

Ill also make a Public Repository on my GitHub account when Im done.

Sounds good. I have your GitHub bookmarked :slight_smile:

Sorry I got stuck on some math, but all good now. Just need to add a thread and a “please wait while we crunch numbers” progress bar :slight_smile:

https://github.com/mikecotrone/Xojo_SubnetCalculatorClass.git

Dirk I am still making a few adjustments to the listbox load in this demo app, but it is working. I will finish the two bugs off in the am :wink: thanks!

I dont remember what it is called, when the IPs in a subnet arent contiguously numbered… those are really weird subnet masks. so IPs 192.168.1.2 and 192.168.1.3 arent in the same subnet.

Does this handle those situations? just curious… I am asking questions/posting answers instead of coding…

Hi Scott. My class will handle Classless and Class Full subnetting so for example your /23 would encompass two /24 networks. Is that what you are asking?

I hope you aren’t getting in ATL what we are getting here in NC. Frozen again :slight_smile:

I am talking about RFC 950 - Support For Non-Contiguous Masks…

and ATL is going to be ICE ICE BABY tonight… yeah 70s on SUN, and tonight we have ICE. yeah!

Gotcha! So No, but it should be an easy yes add. :wink:

to calculate Discontinuous Subnets you have to use the XOR function on the Individual Subnets similar to this:

74.18.23.0/24 - 01001010 . 00010010 . 00010111 . 00000000 
68.34.14.0/24 - 01000100 . 00100010 . 00001110 . 00000000 
84.51.20.0/24 - 01010100 . 00110011 . 00010100 . 00000000 

XOR Result ---- 00011110 . 00110001 . 00011011 . 00000000 = 30.49.27.0 

The way I wrote the class was of two ways initially. 1. Send an IP/Subnet/Mask for validation getting back a single range 2. Send an IP/Subnet/Mask for All Ranges. I could add a third which would change the interface a bit, but it would require you to “Add” multiple individual IP/Masks and then click on that button that triggers the methods/function to return the XOR of the Subnet/Masks added.

If you think there is a need for this these days let me know and Ill see about adding it.

Thanks Scott!

PS Its snowing again here in Greensboro, NC :frowning:

I have no need as of today. I know I have used them in the past at some places that used them for another layer (of many) of security. I personally have not run into one in the last 5ish years.

I wouldnt put the effort into it unless you get bored at 2am and need something to clear your mind (by coding).

Good luck with the snow…
Ice comes about 11pm or so tonight for us.

I feel bad for you guys. Meanwhile, it was supposed to snow heavily here today and we didn’t even get flurries. I take this to mean that it will not snow again this season, I won’t have to shovel any more, and I’m not even remotely jinxing things by typing this.

I left Long Island to escape the Snow :wink: Now look at me :slight_smile:

https://twitter.com/Mike_Cotrone/status/440615794876370944/photo/1

[quote=69115:@scott boss]I have no need as of today. I know I have used them in the past at some places that used them for another layer (of many) of security. I personally have not run into one in the last 5ish years.

I wouldnt put the effort into it unless you get bored at 2am and need something to clear your mind (by coding).

Good luck with the snow…
Ice comes about 11pm or so tonight for us.[/quote]

You and me both. Heck I don’t think I have really summarized any Enterprises in the last 6 years also. Just Service Providers.