Currenly I have a c function that takes a ip address and subnetmask and checks if given ipv4 is private/public.
It does by following logic to matchsubnet:
(local ipv4 address && local subnetmask) == (given ipv4 && given subnetmask)
What logic can be written for ipv6? I can write a function to receive an ip and subnet prefix. Can i get local subnet prefix?