ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] services file and port ranges

From: "Maynard, Chris" <Christopher.Maynard@xxxxxxxxx>
Date: Mon, 7 Apr 2008 11:57:03 -0400
I noticed that IANA lists a few ports in ranges.  For example, x11 is
listed as:
x11             6000-6063/tcp   X Window System
x11             6000-6063/udp   X Window System

But addr_resolv.c:parse_service_line() currently expects entries in
services(5) format, i.e., a single port only.  So, should IANA be
encouraged to change their format to avoid port ranges and comply with
the format specified in services(5)?  Or, more likely, should the
parsing of the services file be changed so that a range of ports is
allowed and any port within the range will be returned as the
corresponding service name?

- Chris
References: http://www.iana.org/assignments/port-numbers.