[back to index]

#include <dkim.h>
int dkim_dns_set_init(
	DKIM_LIB *libopendkim,
        int (*func)(void **)

Declares the function to be used by a libopendkim instance when it needs to initialize a DNS resolver. By default, a stub function that initializes the standard system resolver is set.

The function will be passed the following arguments:

  1. A pointer to a handle that will be updated to refer to the instantiated resolver service. The procedure is equivalent to instantiating a resolver service and then passing a pointer representing that service to dkim_dns_set_query_service().
The function is expected to return one of the following:
  • DKIM_DNS_SUCCESS -- the resolver was initialized successfully
  • DKIM_DNS_ERROR -- an error occurred
Called When dkim_dns_set_init() can be called at any time, but is presumably most useful prior to doing any DNS operations such as are done during dkim_eoh() when verifying. The function will be called implicitly if no service handle has been stored and a query is ready to be started.
libopendkim The library instantiation handle, returned by dkim_init().
func A pointer to a function that should be used to instantiate a DNS resolver. If NULL, no initialization function will be called.
  • DKIM_DNS_SUCCESS -- successful operation
  • DKIM_DNS_ERROR -- an error occurred
  • None.

Copyright (c) 2007 Sendmail, Inc. and its suppliers. All rights reserved.
Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the respective licenses.