IPsubnet calculator IPv4 IPv6 in HTML 5 and css originally created im 2006 in HTML4 . multi-language
jmpep / ipsubnet Goto Github PK
View Code? Open in Web Editor NEWIP subnet calculator IPv4 IPv6 HTML5 css bootstrap
License: MIT License
IP subnet calculator IPv4 IPv6 HTML5 css bootstrap
License: MIT License
I have these ranges:
2600:380:F510::1 - 2600:380:F51F:FFFF:FFFF:FFFF:FFFF:FFFE
32.0.0.0 - 32.255.255.255
And I want to be able to insert them and get the right CIDR for them.
Cacti plugin manager write that:
Not Compatible
I Change setup.php and add file INFO.
After this I install plugin, but have html and jquery error.
Help fix and prepare the plug-in to the new version Cacti.
I have make some change. Now plugin install and work? but i think that I have some mistake. Please repear me.
ipsubnet.zip
The subnet calculator would be even more useful if you could pass variables in the link to it in the form of
https://cactiserver/cacti/plugins/ipsubnet/ipsubnet.php?IP=192.168.1.10/22
That way we could have links to specific subnets in our documentation and open the calculator with all the fields already filled out!
It would be nice to have the next function below embedded into this project in some way.
I am working with maxmind Country lite DB and they store IPv4 and IPv6 on the same DB.
For the data structure too stay consistent the library or the DB file stores the IPv4 in a 16 Bytes array instead of a 4 Bytes array.
The original IPv4 CIDR address is: 1.0.128.0/17
However when I represent it as an IPv6 I recieve the next string: ::100:8000/113
.
The Bytes array of this address is : [0 0 0 0 0 0 0 0 0 0 0 0 1 0 128 0]
Since I am working with GoLang the only way I found was to write my own functions to convert this value into a visible IPv4 CIDR.
The next is my functions sources:
var v4InV6Array = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
func hasEmptyLeadingBytes(ip net.IP) bool {
return equal(v4InV6Array, ip[0:12])
}
func fakeIPv6ToIPv4(ip net.IP) net.IP {
if hasEmptyLeadingBytes(ip.To16()) {
return ip[12:16]
}
return nil
}
func convertFakeV6ToV4(ip *net.IPNet) *net.IPNet {
if hasEmptyLeadingBytes(ip.IP.To16()) {
return &net.IPNet{IP: ip.IP[12:16], Mask: ip.Mask}
}
return ip
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.