You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
The text was updated successfully, but these errors were encountered: