1Net::DNS::Text(3) User Contributed Perl Documentation Net::DNS::Text(3)
2
3
4
6 Net::DNS::Text - DNS text representation
7
9 use Net::DNS::Text;
10
11 $object = new Net::DNS::Text('example');
12 $string = $object->string;
13
14 $object = decode Net::DNS::Text( \$data, $offset );
15 ( $object, $next ) = decode Net::DNS::Text( \$data, $offset );
16
17 $data = $object->encode;
18 $text = $object->value;
19
21 The "Net::DNS::Text" module implements a class of text objects with
22 associated class and instance methods.
23
24 Each text object instance has a fixed identity throughout its lifetime.
25
27 new
28 $object = new Net::DNS::Text('example');
29
30 Creates a text object which encapsulates a single character string
31 component of a resource record.
32
33 Arbitrary single-byte characters can be represented by \ followed by
34 exactly three decimal digits. Such characters are devoid of any special
35 meaning.
36
37 A character preceded by \ represents itself, without any special
38 interpretation.
39
40 decode
41 $object = decode Net::DNS::Text( \$buffer, $offset );
42
43 ( $object, $next ) = decode Net::DNS::Text( \$buffer, $offset );
44
45 Creates a text object which represents the decoded data at the
46 indicated offset within the data buffer.
47
48 The argument list consists of a reference to a scalar containing the
49 wire-format data and offset of the text data.
50
51 The returned offset value indicates the start of the next item in the
52 data buffer.
53
54 encode
55 $data = $object->encode;
56
57 Returns the wire-format encoded representation of the text object
58 suitable for inclusion in a DNS packet buffer.
59
60 raw
61 $data = $object->raw;
62
63 Returns the wire-format encoded representation of the text object
64 without the explicit length field.
65
66 value
67 $value = $text->value;
68
69 Character string representation of the text object.
70
71 string
72 $string = $text->string;
73
74 Conditionally quoted zone file representation of the text object.
75
77 Coding strategy is intended to avoid creating unnecessary argument
78 lists and stack frames. This improves efficiency at the expense of code
79 readability.
80
81 Platform specific character coding features are conditionally compiled
82 into the code.
83
85 Copyright (c)2009-2011 Dick Franks.
86
87 All rights reserved.
88
90 Permission to use, copy, modify, and distribute this software and its
91 documentation for any purpose and without fee is hereby granted,
92 provided that the above copyright notice appear in all copies and that
93 both that copyright notice and this permission notice appear in
94 supporting documentation, and that the name of the author not be used
95 in advertising or publicity pertaining to distribution of the software
96 without specific prior written permission.
97
98 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
99 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
100 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
101 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
102 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
103 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
104 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
105
107 perl, Net::DNS, RFC1035, RFC3629, Unicode TR#16
108
109
110
111perl v5.28.0 2018-11-14 Net::DNS::Text(3)