X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/e3a69b62f532a5ac4990d529e015683108155a98..2b8d6aff36a25e06f418aec9e90fe7668562914b:/src/src/macros.h diff --git a/src/src/macros.h b/src/src/macros.h index b97e99315..fd53de883 100644 --- a/src/src/macros.h +++ b/src/src/macros.h @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2017 */ +/* Copyright (c) University of Cambridge 1995 - 2018 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -24,7 +24,7 @@ a string as a text string. This is sometimes useful for debugging output. */ /* When running in the test harness, the load average is fudged. */ #define OS_GETLOADAVG() \ - (running_in_test_harness? (test_harness_load_avg += 10) : os_getloadavg()) + (f.running_in_test_harness? (test_harness_load_avg += 10) : os_getloadavg()) /* The address_item structure has a struct full of 1-bit flags. These macros @@ -85,7 +85,7 @@ as unsigned. */ a no-op once an SSL session is in progress. */ #ifdef SUPPORT_TLS -#define mac_smtp_fflush() if (tls_in.active < 0) fflush(smtp_out); +#define mac_smtp_fflush() if (tls_in.active.sock < 0) fflush(smtp_out); #else #define mac_smtp_fflush() fflush(smtp_out); #endif @@ -469,6 +469,7 @@ enum { Li_outgoing_interface, Li_outgoing_port, Li_pid, + Li_pipelining, Li_proxy, Li_queue_time, Li_queue_time_overall, @@ -550,6 +551,9 @@ table exim_errstrings[] in log.c */ #ifdef SUPPORT_I18N # define ERRNO_UTF8_FWD (-49) /* target not supporting SMTPUTF8 */ #endif +#if defined(SUPPORT_TLS) && defined(EXPERIMENTAL_REQUIRETLS) +# define ERRNO_REQUIRETLS (-50) /* REQUIRETLS session not started */ +#endif /* These must be last, so all retry deferments can easily be identified */ @@ -750,7 +754,12 @@ enum { hwhy_unknown, hwhy_retry, hwhy_insecure, hwhy_failed, hwhy_deferred, /* Domain lookup types for routers */ -enum { lk_default, lk_byname, lk_bydns }; +#define LK_DEFAULT BIT(0) +#define LK_BYNAME BIT(1) +#define LK_BYDNS BIT(2) /* those 3 should be mutually exclusive */ + +#define LK_IPV4_ONLY BIT(3) +#define LK_IPV4_PREFER BIT(4) /* Values for the self_code fields */ @@ -819,11 +828,14 @@ enum { /* Flags for host_find_bydns() */ -#define HOST_FIND_BY_SRV 0x0001 -#define HOST_FIND_BY_MX 0x0002 -#define HOST_FIND_BY_A 0x0004 -#define HOST_FIND_QUALIFY_SINGLE 0x0008 -#define HOST_FIND_SEARCH_PARENTS 0x0010 +#define HOST_FIND_BY_SRV BIT(0) +#define HOST_FIND_BY_MX BIT(1) +#define HOST_FIND_BY_A BIT(2) +#define HOST_FIND_BY_AAAA BIT(3) +#define HOST_FIND_QUALIFY_SINGLE BIT(4) +#define HOST_FIND_SEARCH_PARENTS BIT(5) +#define HOST_FIND_IPV4_FIRST BIT(6) +#define HOST_FIND_IPV4_ONLY BIT(7) /* Actions applied to specific messages. */ @@ -856,6 +868,7 @@ enum { #define topt_use_bdat 0x100 /* prepend chunks with RFC3030 BDAT header */ #define topt_output_string 0x200 /* create string rather than write to fd */ #define topt_continuation 0x400 /* do not reset buffer */ +#define topt_not_socket 0x800 /* cannot do socket-only syscalls */ /* Options for smtp_write_command */ @@ -1005,6 +1018,11 @@ enum { FILTER_UNSET, FILTER_FORWARD, FILTER_EXIM, FILTER_SIEVE }; #define OPTION_PIPE BIT(5) #define OPTION_SIZE BIT(6) #define OPTION_CHUNKING BIT(7) +#define OPTION_REQUIRETLS BIT(8) + +/* Codes for tls_requiretls requests (usually by sender) */ + +#define REQUIRETLS_MSG BIT(0) /* REQUIRETLS onward use */ /* Argument for *_getc */ @@ -1019,5 +1037,10 @@ enum { FILTER_UNSET, FILTER_FORWARD, FILTER_EXIM, FILTER_SIEVE }; #define UTF8_VERT_2DASH "\xE2\x95\x8E" +/* Options on tls_close */ +#define TLS_NO_SHUTDOWN 0 +#define TLS_SHUTDOWN_NOWAIT 1 +#define TLS_SHUTDOWN_WAIT 2 + /* End of macros.h */