Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method to compare between public addresses for IPv6 #112

Open
leechunhoe opened this issue Feb 28, 2019 · 0 comments
Open

Method to compare between public addresses for IPv6 #112

leechunhoe opened this issue Feb 28, 2019 · 0 comments

Comments

@leechunhoe
Copy link

leechunhoe commented Feb 28, 2019

I might missed out, but is there any method to compare the network prefix (i.e. the first 64 bits) between 2 IPv6 addresses?

Something like:

a = IPAddress '12:34:3cf:7ab:98bc:e46e:ce45:9986'
b = IPAddress '12:34:3cf:7ab:7fbc:e45a:c6f:112a'

a.network_prefix #  returns '12:34:3cf:7ab'
a.same_domain? b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant