The canonical IANA port number URL now returns XML. Update

make-services.pl to to use the old-style text URL and add a comment
about parsing the XML instead.

Update the services file. Due to format changes it generates a lot of
text that should be commented out, but it's apparently been doing that
for a while now.

svn path=/trunk/; revision=38652
This commit is contained in:
Gerald Combs 2011-08-21 22:34:50 +00:00
parent c5433bb140
commit 5aeec1def6
2 changed files with 20684 additions and 104615 deletions

125288
services

File diff suppressed because it is too large Load Diff

View File

@ -32,8 +32,11 @@ my @exclude_pats = qw(
^spl-itunes
^shilp
);
my $iana_port_url = "http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt";
$in = "http://www.iana.org/assignments/port-numbers" unless(defined $in);
# As of August 2011, the page linked from http://www.iana.org/protocols/
# is XML. Perhaps we should parse that instead.
$in = $iana_port_url unless(defined $in);
my $body = "";
@ -102,7 +105,7 @@ if (length($body) < $min_size * 0.9) {
open OUT, "> $svc_file";
print OUT <<"_SMINMPEC";
print OUT <<"_HEADER";
# This is a local copy of the IANA port-numbers file.
#
# \$Id\$
@ -114,9 +117,9 @@ print OUT <<"_SMINMPEC";
# http://www.wireshark.org/lists/wireshark-dev/200708/msg00160.html
#
# The original file can be found at:
# http://www.iana.org/assignments/port-numbers
# $iana_port_url
#
$body
_SMINMPEC
_HEADER
close OUT;