Seems like it might be used in other places, so factor it into the library. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Explain some of the more obscure logic, or where we deviate from what the original awk code did. Also, give a count of the usable addresses on the subnet. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Also add better error checking on input. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>