DNS-Unbound
view release on metacpan or search on metacpan
libunbound equivalents.
You donât need these if you use one of the event loop subclasses
(which is recommended).
## _OBJ_->poll()
## _OBJ_->fd()
## _OBJ_->wait()
## _OBJ_->process()
## _OBJ_->count\_pending\_queries()
Returns the number of outstanding asynchronous queries.
# METHODS FOR DEALING WITH DNSSEC
The following correspond to their equivalents in libunbound
and will only work if the underlying libunbound version supports them.
They return _OBJ_ and throw errors on failure.
## _OBJ_->add\_ta( $TA )
## _OBJ_->add\_ta\_autr( $PATH )
(Available only if libunbound supports it.)
## _OBJ_->add\_ta\_file( $PATH )
## _OBJ_->trustedkeys( $PATH )
# CONVENIENCE FUNCTIONS
The following may be called either as object methods or as static
functions (but not as class methods). In addition to these,
[Socket](https://metacpan.org/pod/Socket) provides the `inet_ntoa()` and `inet_ntop()`
functions for decoding the values of `A` and `AAAA` records.
**NOTE:** Consider parsing [DNS::Unbound::Result](https://metacpan.org/pod/DNS%3A%3AUnbound%3A%3AResult)âs `answer_packet()`
as a more robust, albeit heavier, way to parse query result data.
[Net::DNS::Packet](https://metacpan.org/pod/Net%3A%3ADNS%3A%3APacket) and [AnyEvent::DNS](https://metacpan.org/pod/AnyEvent%3A%3ADNS)âs `dns_unpack()` are two good
ways to parse DNS packets.
## $decoded = decode\_name($encoded)
Decodes a DNS name. Useful for, e.g., `NS`, `CNAME`, and `PTR` query
results.
Note that this functionâs return will normally include a trailing `.`
because of the trailing NUL byte in an encoded DNS name. This is normal
and expected.
## $strings\_ar = decode\_character\_strings($encoded)
Decodes a list of character-strings into component strings,
returned as an array reference. Useful for `TXT` query results.
# SEE ALSO
[Net::DNS::Resolver::Recurse](https://metacpan.org/pod/Net%3A%3ADNS%3A%3AResolver%3A%3ARecurse) provides comparable logic to this module
in pure Perl. Like Unbound, it is maintained by
[NLnet Labs](https://nlnetlabs.nl/).
[Net::DNS::Resolver::Unbound](https://metacpan.org/pod/Net%3A%3ADNS%3A%3AResolver%3A%3AUnbound) is another XS binding to Unbound,
implemented as a subclass of [Net::DNS::Resolver](https://metacpan.org/pod/Net%3A%3ADNS%3A%3AResolver).
# LICENSE & COPYRIGHT
Copyright 2019-2022 Gasper Software Consulting.
This library is licensed under the same terms as Perl itself.
# REPOSITORY
[https://github.com/FGasper/p5-DNS-Unbound](https://github.com/FGasper/p5-DNS-Unbound)
# THANK YOU
Special thanks to [ATOOMIC](https://metacpan.org/author/ATOOMIC) for
making some helpful review notes.
( run in 0.548 second using v1.01-cache-2.11-cpan-437f7b0c052 )