opendmarc_policy_parse_dmarc()

[back to index]

SYNOPSIS
#include <dmarc.h>
OPENDMARC_STATUS_T opendmarc_policy_parse_dmarc(
	DMARC_POLICY_T *pctx,
	u_char *domain, u_char *record
);
Provide the library with a DMARC record to parse.
DESCRIPTION
Called When opendmarc_policy_parse_dmarc() must be called before you call opendmarc_get_policy_to_enforce().
ARGUMENTS
ArgumentDescription
pctx The address of a structure of type DMARC_POLICY_T as returned from opendmarc_policy_connect_init().
domain A string containing the domain for which you looked up the DMARC record.
record A string containing the DMARC record that the library should parse.
RETURN VALUES
  • DMARC_PARSE_OKAY -- Success.
  • DMARC_PARSE_ERROR_NULL_CTX -- If you passed in a pctx value that was NULL.
  • DMARC_PARSE_ERROR_BAD_VERSION -- If the DMARC record's v= was bad.
  • DMARC_PARSE_ERROR_BAD_VALUE -- If a value following an = was bad or illegal.
  • DMARC_PARSE_ERROR_NO_REQUIRED_P -- The required p= was absent.
NOTES
  • In general, avoid calling this function directly. Instead call opendmarc_policy_store_dmarc() instead.
  • This function expects the DMARC record to be supplied as a single line of text. If the record appeared in DNS as a collection of quoted parts, you must assemble those parts into a single string before calling this function.

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.