In Android (or Java, I suppose), it's easy enough to determine whether a given address is site-local:
InetAddress a = InetAddress.getByName (addr_string);
if (a.isSiteLocalAddress())
...
However, each of the three flavors of site-local addresses has a different netmask associated with it. Is there a quick and easy to generate the netmask from the address??