$2 ~ /----------------/ {
	start = 1
}
$1 ~ /41-255/{
	exit
}
$1=="#" {
	com++;
	}

start==1 {
	fstart = 2;
	if ($1 == "#")
		next		
	comment = $fstart
	for (i=fstart+1;i<=NF;i++)
	{
		if (substr($i,1,1)!= "[")
			comment = comment "-" $i
		else
			break
	}
	if (comment == "Unassigned")
		comment = "UNK " $1
	if ($1 > maxport)
		maxport = $1
	printf "strncpy(icmp_types[%d],\"%s\",SN_PORT_TYPE_LEN);\n",$1,comment > "icmp.gen" 
}
END{
	print "#define ICMPMAX " maxport > "icmpdefs.gen"
}

 
