Mega Code Archive

 
Categories / Perl / Network
 

The getprotobynumber function takes the protocol number as an argument and returns the name of the protocol, any aliases, and its

# Format: getprotobynumber(NUMBER); ($name,  $aliases, $proto) = getprotobynumber(0); print "name=$name\taliases=$aliases\t$protocol number=$proto\n";