# opendmarc_policy_fetch_aspf()

[back to index]

SYNOPSIS |
    #include <dmarc.h>
    OPENDMARC_STATUS_T opendmarc_policy_fetch_aspf(
    	DMARC_POLICY_T *pctx,
    	int *aspf
    );
Query the library to find the `aspf=` value from the `DMARC` record.
DESCRIPTION |
Called When | `opendmarc_policy_fetch_aspf()` is called after the DMARC record has been fetched and parsed.
ARGUMENTS |
Argument | Description
--- | ---
pctx | The address of a structure of type `DMARC_POLICY_T` as returned from opendmarc_policy_connect_init().
aspf | The address of an integer to receive the value following the `aspf=`, a value of: `DMARC_RECORD_A_UNSPECIFIED` if the `aspf=` was absent or `DMARC_RECORD_A_STRICT` if `aspf=s` or `DMARC_RECORD_A_RELAXED` if `aspf=r`.
RETURN VALUES | `DMARC_PARSE_OKAY` -- On success. `DMARC_PARSE_ERROR_EMPTY` -- The `pctp` pointer was NULL. `DMARC_PARSE_ERROR_NULL_CTX` -- If you passed in a `aspf` value that was NULL.
NOTES | Call this function only after a `DMARC` record was fetched and parsed with opendmarc_policy_query_dmarc() or supplied to the library with opendmarc_policy_store_dmarc().

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.