The getprotobynumber function takes the protocol number as an argument and returns the name of the protocol, any aliases, and its protocol number.
# Format: getprotobynumber(NUMBER);
($name, $aliases, $proto) = getprotobynumber(0);
print "name=$name\taliases=$aliases\t$protocol number=$proto\n";
Related examples in the same category