D/N/A project
A new way of using
Domain Name Service

Documents :: API

RNA::DNS


NAME

RNA::DNS


DESCRIPTION

This module is part of the RNA Server, and implementation of DNA Project. DNA is an acronym for Domain Name Anarchy. For further informations take a look at DNA man page.

This module is the backend for the DNS system.


API

$dns = RNA::DNS-new()

Create a new instance of DNS backend. After creation, RNA::DNS object can be used invoking $dns->manage_query($dns_packet) method, where $dns_packet is a raw DNS packet datagram.

$dns-manage_query($query)

Resolve a query. Query can be passed as a RNA::DNS::Packet object or raw DNS packet datagram.

PRIVATE METHODS

Following methods should never be used directly.

$dns-cache_packet($packet)

Cache all the fields contained inside a packet. $packet can be a RNA::DNS::Packet object or a raw DNS packet.

$dns->recurse( \%rr ) [internal] [TOCOMPLETE]

Performe recursive query for query %rr, a hash conforming to RNA::DNS::Packet::parse() produced ones. $dns->recurse() return an RCODE numeric value which can be directly used to emit error packets. This also means that, unlike all the other subs in RNA, a success is rapresented by a 0 exit number, while 1-15 means correspondig error has been encoutered.

$dns-list_root_servers_ip() [internal]

Return full list of all declared root servers ip address.

$dns-forward(\%query) [internal] [TOTEST]

Resolve query described in %query using external forwarders as specified in forwarders directive.

$dns-random_forwarder() [internal]

Return a External Forwardable Name Server IP address choosed randomly from available pool. In list context return also a prepacked version of IP address created with inet_aton().

$dns->negative_answer($rr, $reason) [internal] [TODO]

Send back a packet stating that the server has some internal problems. $rr is the QD query. $reason is one of rcode possible.

UPDATE: may be that this code has been obsoleted by PacketLab ERR_<...> facilities.


AUTHOR

Tx0


CREDITS

Many lines of code and many practical programming solutions has been taken from Net::DNS::* modules by Michael Fuhr and others. For further information please see http://www.net-dns.org/ or the man page of Net::DNS.


SEE ALSO

RNA(5), RNA::Internals(3), RNA::Internode(3), rnad(8), Net::DNS(3), Net::DNS::Header(3)

This page last modified: Wednesday, 09-Jan-2008 16:25:01 CET
© 2007-2008 Tx0 - Some right reserved
This work is released under Creative Commons License
hosted by gna!
Valid HTML 4.01 Transitional
Valid CSS!