Subject: | HINFO data parsing not standards-compliant? |
From RFC1033:
HINFO (Host Info)
<host> [<ttl>] [<class>] HINFO <hardware> <software>
The HINFO record gives information about a particular host. The data
is two strings separated by whitespace. The first string is a
hardware description and the second is software. The hardware is
usually a manufacturer name followed by a dash and model designation.
The software string is usually the name of the operating system.
Official HINFO types can be found in the latest Assigned Numbers RFC,
the latest of which is RFC-1010. The Hardware type is called the
Machine name and the Software type is called the System name.
Some sample HINFO records:
SRI-NIC.ARPA. HINFO DEC-2060 TOPS20
UCBARPA.Berkeley.EDU. HINFO VAX-11/780 UNIX
--
From what I read, the RFC does not require that fields be enclosed in
quotation marks (single or double).
Trying to create a new DNS::RR::HINFO record from the example record in
the RFC does not work, unless the fields are enclosed in quotes.
The following code:
#!/usr/bin/perl -w
use Net::DNS::RR;
my $rr = Net::DNS::RR->new("SRI-NIC.ARPA. HINFO DEC-2060 TOPS20");
print $rr->type, "\n";
print "cpu = ", $rr->cpu, "\n";
print "os = ", $rr->os, "\n";
Returns:
# perl test-hinfo.pl
type= HINFO
***
*** WARNING!!! The program has attempted to call the method
*** "cpu" for the following RR object:
***
*** SRI-NIC.ARPA. 0 IN HINFO ; no data
***
Thanks for looking into this.
cv