1Net::DNS::Question(3) User Contributed Perl DocumentationNet::DNS::Question(3)
2
3
4
6 Net::DNS::Question - DNS question class
7
9 "use Net::DNS::Question"
10
12 A "Net::DNS::Question" object represents a record in the question sec‐
13 tion of a DNS packet.
14
16 new
17
18 $question = Net::DNS::Question->new("example.com", "MX", "IN");
19
20 Creates a question object from the domain, type, and class passed as
21 arguments.
22
23 RFC4291 and RFC4632 IP address/prefix notation is supported for queries
24 in in-addr.arpa and ip6.arpa subdomains.
25
26 qname, zname
27
28 print "qname = ", $question->qname, "\n";
29 print "zname = ", $question->zname, "\n";
30
31 Returns the domain name. In dynamic update packets, this field is
32 known as "zname" and refers to the zone name.
33
34 qtype, ztype
35
36 print "qtype = ", $question->qtype, "\n";
37 print "ztype = ", $question->ztype, "\n";
38
39 Returns the record type. In dymamic update packets, this field is
40 known as "ztype" and refers to the zone type (must be SOA).
41
42 qclass, zclass
43
44 print "qclass = ", $question->qclass, "\n";
45 print "zclass = ", $question->zclass, "\n";
46
47 Returns the record class. In dynamic update packets, this field is
48 known as "zclass" and refers to the zone's class.
49
50 print
51
52 $question->print;
53
54 Prints the question record on the standard output.
55
56 string
57
58 print $qr->string, "\n";
59
60 Returns a string representation of the question record.
61
62 data
63
64 $qdata = $question->data($packet, $offset);
65
66 Returns the question record in binary format suitable for inclusion in
67 a DNS packet.
68
69 Arguments are a "Net::DNS::Packet" object and the offset within that
70 packet's data where the "Net::DNS::Question" record is to be stored.
71 This information is necessary for using compressed domain names.
72
74 Copyright (c) 1997-2002 Michael Fuhr.
75
76 Portions Copyright (c) 2002-2004 Chris Reinhardt.
77
78 Portions Copyright (c) 2003,2006-2007 Dick Franks.
79
80 All rights reserved. This program is free software; you may redis‐
81 tribute it and/or modify it under the same terms as Perl itself.
82
84 perl(1), Net::DNS, Net::DNS::Resolver, Net::DNS::Packet,
85 Net::DNS::Update, Net::DNS::Header, Net::DNS::RR, RFC 1035 Section
86 4.1.2
87
88
89
90perl v5.8.8 2007-08-01 Net::DNS::Question(3)