Services::PortMapping

Constants with TCP and UDP port mappings

Services::PortMapping

Map ports to services (and back) for internet services. Using this CSV file included in the distribution, creates and exports 4 hashes that map ports to services and back, for UDP and TCP.

  • %TCPServices maps ports to TCP services

  • %TCPPorts maps service names to ports;

And idem with UDP instead of TCP.

Example

We have [protocol]Services, a hash that maps port numbers to the services it hosts, and [protocol]Ports, which maps the conventional service name to the port it uses. protocol == any <TCP UDP SCTP DCCP>

No, I had never heard about these last two before

say %TCPServices<80>; # should return www-http
say %UDPPorts<domain>;   # should return 53

You can also use .keys to print the existing ports or services.

License

(c) JJ Merelo, [email protected], 2020-2022

Released under the GPL-3.0 license.

Services::PortMapping vv0.0.4

Constants with TCP and UDP port mappings

Authors

  • JJ Merelo

License

GPL-3.0-only

Dependencies

Text::CSV

Test Dependencies

Provides

  • Services::PortMapping

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.