markrogoyski / ipv4-subnet-calculator-php

Network calculator for subnet mask and other classless (CIDR) network information.
MIT License
168 stars 42 forks source link

Ipv6 #19

Open Nevercold opened 2 years ago

Nevercold commented 2 years ago

it would be good if the whole thing would also work with ipv6.

Nevercold commented 2 years ago

or at least one function like ipv6 to addr

markrogoyski commented 2 years ago

Hi @Nevercold,

Thank you for your interest in this project.

Can you provide an example of what kind of functionality you are requesting. For example, what are the inputs and outputs with at least one concrete example.

Thanks, Mark

Nevercold commented 2 years ago

Hey!

i actually just need to get the arpa from an ipv6 address.

Input: 2001:db8::1 Output: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa

$sub = new IPv6\SubnetCalculator('2001:db8::1');
$ipv6ArpaDomain = $sub->getIPv6ArpaDomain();

Thanks.