Previous: dns variables, Up: dns Module



7.12.3 dns event handlers

The DNS module supplies the following event handlers:

dns_mapping_valid (dm: dns_mapping)
The given request was looked up and it was identical to its previous mapping.
dns_mapping_unverified (dm: dns_mapping)
The given request was looked up but no answer came back.
dns_mapping_new_name (dm: dns_mapping)
In the past, the given address did not resolve to a hostname; this time, it did.
dns_mapping_lost_name (dm: dns_mapping)
In the past, the given address resolved to a hostname; now, that name has gone away. (An answer was received, but it stated that there is no hostname corresponding to the given address.)
dns_mapping_name_changed (old_dm: dns_mapping, new_dm: dns_mapping)
The name returned this time for the given address differs from the name returned in the past.
dns_mapping_altered (dm: dns_mapping, old_addrs: set[addr], new_addrs: set[addr])
The addresses associated with the given hostname have changed. Those in old_addrs used to be part of the set returned for the name, but aren't any more; while those in new_addrs didn't used to be, but now are. There may also be some unchanged addresses, which are those in dm$addrs but not in new_addrs.