[PATCH 1/2] Implement IP netmask caculation to replace "ipcalc -m"