[back to index]

#include <dmarc.h>
OPENDMARC_STATUS_T opendmarc_policy_library_init(
One time initialization of the library for use at program startup.
Called When opendmarc_policy_library_init() is called after the program starts and before multi-threading operation begins.
lib The address of a structure of type OPENDMARC_LIB_T that your code has filled out with appropriate values.
  • DMARC_PARSE_OKAY -- Success.
  • DMARC_PARSE_ERROR_NULL_CTX -- If you passed in a lib value that was NULL.
  • DMARC_TLD_ERROR_UNKNOWN -- If the tld_type specified is not one that the library knows about.
  • Other possible return values various errno values set by failure to read the TLD file.
  • This function is not thread safe and must only be called once and only once when the program starts and before multi-threading begins.
  • If you fail to use a TLD file, the library will not be able to perform a second lookup for a DMARC record by converting a subdomain into an organizational domain. So will only perform the first lookup of the subdomain, possibly missing a valid DMARC record.

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 license.