Lines Matching refs:data
55 # Now you can add TSIG, just specify key/key data with:
61 # Note that this data will still be sent with any request for
62 # pattern, only this data will be signed. Currently, this is only
184 return $packet->data;
188 # given a stream of data, reads a DNS-formatted name and returns its
191 my ($data) = @_;
195 $label_len = unpack("c", $data);
196 $data = substr($data, $label_len + 1);
203 # given a stream of data, reads a DNS wire-format packet and returns
206 my ($data) = @_;
220 ($header, $offset) = Net::DNS::Header->decode(\$data);
222 ($header, $offset) = Net::DNS::Header->parse(\$data);
228 Net::DNS::Question->decode(\$data, $offset);
231 Net::DNS::Question->parse(\$data, $offset);
236 ($q, $offset) = Net::DNS::RR->decode(\$data, $offset);
238 ($q, $offset) = Net::DNS::RR->parse(\$data, $offset);
243 ($q, $offset) = Net::DNS::RR->decode(\$data, $offset);
245 ($q, $offset) = Net::DNS::RR->parse(\$data, $offset);
250 ($q, $offset) = Net::DNS::RR->decode(\$data, $offset);
252 ($q, $offset) = Net::DNS::RR->parse(\$data, $offset);
260 # to sign multiple-message TCP responses. Several data that are included
267 # the unwanted data from the digest before calling the default sign_hmac
270 my ($key, $data) = @_;
273 my $rmacsize = unpack("n", $data);
274 $data = substr($data, 2);
277 my $rmac = substr($data, 0, $rmacsize);
278 $data = substr($data, $rmacsize);
281 my $plen = packetlen($data);
282 my $pdata = substr($data, 0, $plen);
283 $data = substr($data, $plen);
286 $data = substr($data, namelen($data));
287 $data = substr($data, 6);
288 $data = substr($data, namelen($data));
290 # preserve the TSIG data
291 my $tdata = substr($data, 0, 8);
294 $data = pack("n", $rmacsize) . $rmac . $pdata . $tdata;
295 return Net::DNS::RR::TSIG::sign_hmac($key, $data);
348 print " Signing the data with " .
383 Net::DNS::Packet->new(\($packet->data));
387 push(@results,$packet->data);