1Net::DNS::RR::OPT(3)  User Contributed Perl Documentation Net::DNS::RR::OPT(3)
2
3
4

NAME

6       Net::DNS::RR::OPT - DNS OPT
7

SYNOPSIS

9       "use Net::DNS::RR";
10

DESCRIPTION

12       Class for EDNS pseudo resource record OPT.
13

METHODS

15       This object should only be used inside the Net::DNS classes itself.
16
17       new
18
19       Since "OPT" is a pseudo record and should not be stored in masterfiles;
20       Therefore we have not implemented a method to create this RR from
21       string.
22
23       One may create the object from a hash. See RFC 2671 for details for the
24       meaning of the hash keys.
25
26        $rr= new Net::DNS::RR {
27           name => "",     # Ignored and set to ""
28           type => "OPT",
29           class => 1024,    # sets UDP payload size
30           extendedrcode =>  0x00,    # sets the extended RCODE 1 octets
31           ednsflags     =>  0x0000,  # sets the ednsflags (2octets)
32           optioncode   =>   0x0      # 2 octets
33           optiondata   =>   0x0      # optionlength octets
34        }
35
36       The ednsversion is set to 0 for now. The ttl value is determined from
37       the extendedrcode, the ednsversion and the ednsflag.  The rdata is con‐
38       structed from the optioncode and optiondata see section 4.4 of RFC 2671
39
40       If optioncode is left undefined then we do not expect any RDATA.
41
42       The defaults are no rdata.
43
44       do, set_do, clear_do
45
46           $opt->set_do;
47
48       Reads, sets and clears the do flag. (first bit in the ednssflags);
49
50       size
51
52           $opt->size(1498);
53           print "Packet size:". $opt->size() ;
54
55       Sets or gets the packet size.
56

TODO

58       - This class is tailored to use with dnssec.
59
60       - Do some range checking on the input.
61
62       - This class probably needs subclasses once OPTION codes start to be
63       defined.
64
65       - look at use of extended labels
66
68       Copyright (c) 2001, 2002  RIPE NCC.  Author Olaf M. Kolkman
69
70       All Rights Reserved
71
72       Permission to use, copy, modify, and distribute this software and its
73       documentation for any purpose and without fee is hereby granted, pro‐
74       vided that the above copyright notice appear in all copies and that
75       both that copyright notice and this permission notice appear in sup‐
76       porting documentation, and that the name of the author not be used in
77       advertising or publicity pertaining to distribution of the software
78       without specific, written prior permission.
79
80       THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
81       INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO
82       EVENT SHALL AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
83       DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
84       PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
85       ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
86       THIS SOFTWARE.
87
88       Based on, and contains, code by Copyright (c) 1997-2002 Michael Fuhr.
89

SEE ALSO

91       perl(1), Net::DNS, Net::DNS::Resolver, Net::DNS::Packet,
92       Net::DNS::Header, Net::DNS::Question, Net::DNS::RR, RFC 2435 Section 3
93
94
95
96perl v5.8.8                       2007-08-01              Net::DNS::RR::OPT(3)
Impressum