# opendmarc_tld_read_file()

[back to index]

SYNOPSIS

    #include <dmarc.h>
    int opendmarc_tld_read_file(
    	char* path_fname, char *commentstring, char *drop, char *except
    );

Load in a TLD (Top Level Domain) file for use by the library.

DESCRIPTION

Called When | `opendmarc_tld_read_file()` is called once before the program begins to run multi-threaded.

ARGUMENTS

Argument | Description
--- | ---
path_fname | The full or relative pathname to the file containing the `TLD` information.
commentstring | If not NULL, a string that is used to define commentary lines in the file. If NULL, defaults to "//".
drop | If not NULL, a string prefix that is used to define an absolute top level, such as ".com".
except | If not NULL, a string prefix that is used to define an exceptional top level, such as ".reseller.example.com".

RETURN VALUES

- `0` -- On success.
- `!=0` -- And sets `errno` on failure.

NOTES

This function should probably not be called directly, instead consider using opendmarc_policy_library_init().

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.