Skip to main content

log_client_connection_failure

Last updated March 2020

Name

log_client_connection_failure — Register a function with this hook that will be invoked whenever an outbound connection attempt fails

Synopsis

#include "hooks/core/log_client_connection_failure.h"

| void **core_log_client_connection_failure** ( | closure, |   | |   | addr, |   | |   | err, |   | |   | dr, |   | |   | binding_slot, |   | |   | now); |   |

void * <var class="pdparam">closure</var>; struct sockaddr * <var class="pdparam">addr</var>; int <var class="pdparam">err</var>; domain_record * <var class="pdparam">dr</var>; int <var class="pdparam">binding_slot</var>; struct timeval * <var class="pdparam">now</var>;

Description

Register a function with this hook that will be invoked whenever an outbound connection attempt fails. The address of the peer as well as domain/binding information are passed to the hook.

Parameters

closure

A pointer to the closure function.

addr

A pointer to a sockaddr struct.

err

A bitmask constructed from the following bitmasks:

CONN_ACTION_REQUEUE1, CONN_ACTION_PURGE_DOMAIN, CONN_ERROR_MX_LOOKUP_FAILED, CONN_ERROR_MX_LOOKUP_PENDING, CONN_ERROR_SMTP_NULL_MX,
CONN_ERROR_NO_MXS_REACHABLE, CONN_ERROR_PROHIBITED_IP, CONN_ERROR_HOST_MAX_REACHED, CONN_ERROR_SOCKET, CONN_ERROR_IOCTL,
CONN_ERROR_BIND, CONN_ERROR_CONNECT, CONN_ERROR_CONNECT_NETWORK, and CONN_ERROR_CONNECT_TIMEOUT.
dr

A pointer to a domain_record struct. For documentation of this data structure see “domain_record”

binding_slot

The binding slot.

now

A pointer to a timeval struct, which may be NULL.

**Configuration Change. ** Prior to version 3.0, NULL was not an allowed value.

Return Values

This hook returns void.

Threading

This hook will be called in any thread.

See Also

Was this page helpful?