I request you to put this script on a file and then use it

netmask_h2d()
{
set — `echo $1 | sed -e ‘s/\([0-9a-fA-F][0-9a-fA-F]\)/\1\ /g’`
perl -e ‘$,=”.”;print 0x’$1′,0x’$2′,0x’$3’,0x’$4
}

$ netmask_h2d ffff0000
255.255.0.0