||The OPENDMARC_LIB_T is used to pass startup information into the library.
It is designed to require that nothing inside it needs to ever be allocated nor freed.
The items inside the OPENDMARC_LIB_T structure, and their legal values are:
Can be assigned one of two possible values:
- OPENDMARC_TLD_TYPE_NONE -- If you do not want to use any TLD file to resolve the organizational domain
- OPENDMARC_TLD_TYPE_MOZILLA -- If you will supply a current version of the effective_tld_names.dat
file from mozilla.org.
The full or relative path to the TLD file to parse and use.
If and only if your resolver library lacks the res_setservers() interface, the following hooks
are avaliable as a substitute.
If you want the dmarc records looked up by other than the name servers listed in
/etc/resolv.conf and your resolver library lacks the res_setservers() interface. This is the count of the number of entries in nsaddr_list.
struct sockaddr_in nsaddr_list[MAXNS]
If your resolver library lacks the res_setservers() interface,
this is an array of IP addresses of name servers to use
converted to the type struct sockaddr_in.
When your program first starts to run, it should pass a pointer to this OPENDMARC_LIB_T structure
to the opendmarc_policy_library_init function, and when
your program finally shuts down, it should pass a pointer to this OPENDMARC_LIB_T structure
to the opendmarc_policy_library_shutdown function.
- OPENDMARC_LIB_T is not thread safe. It must only be used once from inside
the main thread for startup and shutdown purposes. Multiple threads must not independently
attempt to start/stop the library with separate settings.