# dkim_dns_set_config()

[back to index]

SYNOPSIS |
    #include <dkim.h>
    int dkim_dns_set_config(
    	DKIM_LIB *libopendkim,
            int (*func)(void *, const char *)
    );
Declares the function to be used by a libopendkim instance when it needs to pass arbitrary configuration information to an active DNS resolver. The function will be passed the following arguments: A pointer to a handle that refers to the instantiated resolver service, via a prior call to to the initialization function defined by `dkim_dns_set_init()`. A pointer to a NULL-terminated string that includes configuration information to be used by the referenced resolver. The content of string is passed directly to the underlying resolver's configuration function and is not used by this library. The function is expected to return one of the following: `DKIM_DNS_SUCCESS` -- query was successfully canceled `DKIM_DNS_ERROR` -- an error occurred
DESCRIPTION |
Called When | `dkim_dns_set_config()` 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.
ARGUMENTS |
Argument | Description
--- | ---
libopendkim | The library instantiation handle, returned by `dkim_init()`.
func | A pointer to a function that should be used to pass configuration information to the current resolver instance.
RETURN VALUES | `DKIM_DNS_SUCCESS` -- successful operation `DKIM_DNS_ERROR` -- an error occurred
NOTES | 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.