I didnt know there is a /etc/services sitting there, just like I didnt know ascii(7) before.
It is a plain ASCII files, listing network services name, port number, protocol (TCP/UDP), aliases, and comments. The list includes well-known (port number 0 through 1023) IANAs Service Name and Transport Protocol Port Number Registry, registered ports (1024-49151), as well as dynamic and/or private ports (49152-65535) on my system.
You can simply grep it to query:
% grep '\b80\b' /etc/services http 80/tcp www www-http # World Wide Web HTTP http 80/udp www www-http
Before I stumbled on whatportis which taught me about this file, I searched for the port number in search engine whenever I saw some strange incoming transmission on a port number that I didnt recognize.
According to services(5), C library routines, such as getservbyport(3), use the services list. They parse and utilize the results.
The content of the file varies by distributions and operating systems, but the source probably all is from IANAs list or just using another distribution as upstream source.