For IPV6, the address family will be different, and the address longer. In addition, there are operators to check for networks or addresses being subnets of or addresses contained within other networks. They are included here to avoid the need to fetch and install the BIND libraries to be able to use this code. MAC level ethernet addresses are implemented as a 6 byte struct that contains the address as unsigned chars. Upper and lower case is accepted for the digits 'a' through 'f'.
Output is always in the latter of the given forms.