# opendmarc_policy_to_buf()

[back to index]

SYNOPSIS |
    #include <dmarc.h>
    intopendmarc_policy_to_buf(
    	DMARC_POLICY_T *pctx,
    	char *buf, size_t buflen
    );
Fills out buf with the contents of `DMARC_POLICY_T` *pctx.
DESCRIPTION |
Called When | `opendmarc_policy_to_buf()` may be called anytime `DMARC_POLICY_T` *pctx has data to examine.
ARGUMENTS |
Argument | Description
--- | ---
pctx | The address of a structure of type `DMARC_POLICY_T` as returned from opendmarc_policy_connect_init().
buf | A buffer big enough.
buflen | The size in bytes of the buffer.
RETURN VALUES | `0` -- Success. `EINVAL` -- If you passed in a `pctx`, `buf` that was NULL, or a `buflen` of zero. `E2BIG` -- The `buf` was too small.
NOTES | A successfully filled out `buf` will contain mutilple LF delimited lines of text like the following: IP_ADDR=1.2.3.4 IP_TYPE=IPv4 SPF_DOMAIN= SPF_ORIGIN= SPF_OUTCOME=NONE SPF_HUMAN_OUTCOME= DKIM_FINAL=FALSE DKIM_DOMAIN= DKIM_OUTOME=NONE DKIM_HUMAN_OUTCOME= DKIM_ALIGNMENT=FAIL SPF_ALIGNMENT=FAIL H_ERRNO= ADKIM=RELAXED ASPF=RELAXED P=NONE SP=UNSPECIFIED PCT=100 RF=AFRF,IODEF RI=86400 RUA=mailto:dmarc-a@abuse.net RUF=mailto:dmarc-f@abuse.net FO=1:d:s:

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.