How to Find Out Protocol Name and Number
The below Perl script for identifying protocol by using protocol name as an argument. This script returns its name, name alias if any and the protocol number. This is an easiest way to get the protocol numberPerl Code to Get Protocol Number
# Format: getprotobyname(NAME);
($name, $aliases, $proto ) = getprotobyname('tcp');
print "name=$name aliases=$aliases $protocol number=$proto\n";
