programming-examples/perl/Network/The getprotobynumber function takes the protocol number as an argument and returns the name of the protocol, any aliases, and its protocol number.pl

4 lines
154 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
# Format: getprotobynumber(NUMBER);
($name, $aliases, $proto) = getprotobynumber(0);
print "name=$name\taliases=$aliases\t$protocol number=$proto\n";