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 resource record
7

SYNOPSIS

9           use Net::DNS;
10           $opt = new Net::DNS::RR(
11               type    => "OPT",
12               flags   => 0x8000,      # extended flags
13               rcode   => 0,           # extended RCODE
14               size    => 1280,        # UDP payload size
15               );
16

DESCRIPTION

18       EDNS OPT pseudo resource record.
19
20       The OPT record supports EDNS protocol extensions and is not intended to
21       be created, accessed or modified directly by user applications.
22
23       All access to EDNS features is performed indirectly by operations on
24       the packet header.  The underlying mechanism is entirely hidden from
25       the user.
26

METHODS

28       The available methods are those inherited from the base class augmented
29       by the type-specific methods defined in this package.
30
31       Use of undocumented package features or direct access to internal data
32       structures is discouraged and could result in program termination or
33       other unpredictable behaviour.
34
35   version
36           $version = $rr->version;
37
38       The version of EDNS used by this OPT record.
39
40   size
41               $size = $packet->edns->size;
42               $more = $packet->edns->size(1280);
43
44       size() advertises the maximum size (octets) of UDP packet that can be
45       reassembled in the network stack of the originating host.
46
47   rcode
48               $extended_rcode   = $packet->header->rcode;
49               $incomplete_rcode = $packet->edns->rcode;
50
51       The 12 bit extended RCODE. The most significant 8 bits reside in the
52       OPT record.  The least significant 4 bits can only be obtained from the
53       packet header.
54
55   flags
56               $edns_flags = $packet->edns->flags;
57
58               $do = $packet->header->do;
59               $packet->header->do(1);
60
61       16 bit field containing EDNS extended header flags.
62
63   Options
64               @option = $packet->edns->options;
65
66               $octets = $packet->edns->option($option_code);
67
68               $packet->edns->option( NSID => 'value' );
69               $packet->edns->option( 3    => 'value' );
70
71       When called in a list context, options() returns a list of option codes
72       found in the OPT record.
73
74       When called with a single argument, option() returns the octet string
75       corresponding to the specified option. The function value is undefined
76       if the specified option is absent.
77
78       Options can be changed by providing an argument list containing one or
79       more (name => value) pairs to be added or modified. The effect of such
80       changes is cumulative. An option is deleted if the value is undefined.
81
83       Copyright (c)2001,2002   RIPE NCC.  Author Olaf M. Kolkman.
84
85       Portions Copyright (c)2012 Dick Franks.
86
87       Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.
88
89       All Rights Reserved
90
91       Permission to use, copy, modify, and distribute this software and its
92       documentation for any purpose and without fee is hereby granted,
93       provided that the above copyright notice appear in all copies and that
94       both that copyright notice and this permission notice appear in
95       supporting documentation, and that the name of the author not be used
96       in advertising or publicity pertaining to distribution of the software
97       without specific prior written permission.
98
99       THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
100       INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO
101       EVENT SHALL AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
102       DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
103       PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
104       ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
105       THIS SOFTWARE.
106

SEE ALSO

108       perl, Net::DNS, Net::DNS::RR, RFC2671 Section 4
109
110
111
112perl v5.16.3                      2012-12-28              Net::DNS::RR::OPT(3)
Impressum