&%-bi%& is a no-op.
.new
+. // Keep :help first, then the rest in alphabetical order
.vitem &%-bI:help%&
.oindex "&%-bI:help%&"
.cindex "querying exim information"
synopsis of supported options beginning &`-bI:`&. Use of any of these
options shall cause Exim to exit after producing the requested output.
+.vitem &%-bI:dscp%&
+.oindex "&%-bI:dscp%&"
+.cindex "DSCP" "values"
+This option causes Exim to emit an alphabetically sorted list of all
+recognised DSCP names.
+
.vitem &%-bI:sieve%&
.oindex "&%-bI:sieve%&"
.cindex "Sieve filter" "capabilities"
details.
+.new
+.option dscp smtp string unset
+.cindex "DCSP"
+.cindex "DiffServ"
+This option causes the DSCP value associated with a socket to be set to one
+of a number of fixed strings. The &%-bI:dscp%& option may be used to ask
+Exim which values it knows of. Common values include &`throughput`&,
+&`mincost`&, and on newer systems &`ef`&, &`af41`&, ...
+
+The outbound packets from Exim will be marked with this value in the header
+(for IPv4, the TOS field; for IPv6, the TCLASS field); there is no guarantee
+that these packets will have any effect, not be stripped by networking
+equipment, or do much of anything without cooperation with your Network
+Engineer and those of all network operators between the source and destination.
+.wen
+
.option fallback_hosts smtp "string list" unset
.cindex "fallback" "hosts specified on transport"
$sender_host_name and config options to manage this, and basic check
routines.
+PP/05 DSCP support for outbound connections.
+
Exim version 4.80
-----------------
Current status: work-in-progress; $sender_host_dnssec variable added.
+ 5. DSCP support for outbound connections: on a transport using the smtp driver,
+ set "dscp = ef", for instance, to cause the connections to have the relevant
+ DSCP (IPv4 TOS or IPv6 TCLASS) value in the header. Supported values depend
+ upon system libraries. "exim -bI:dscp" to list the ones Exim knows of.
+
Version 4.80
------------
unset routers 4.00
unset transports
drop_cr boolean false main 4.00 became a no-op in 4.21
+dscp string unset smtp 4.81
dsn_from string* + main 4.67
envelope_to_add boolean false transports
envelope_to_remove boolean true main
*************************************************/
enum commandline_info { CMDINFO_NONE=0,
- CMDINFO_HELP, CMDINFO_SIEVE };
+ CMDINFO_HELP, CMDINFO_SIEVE, CMDINFO_DSCP };
"If the string is not recognised, you'll get this help (on stderr).\n"
"\n"
" exim -bI:help this information\n"
+" exim -bI:dscp dscp value keywords known\n"
" exim -bI:sieve list of supported sieve extensions, one per line.\n"
);
return;
for (pp = exim_sieve_extension_list; *pp; ++pp)
fprintf(stream, "%s\n", *pp);
return;
-
+ case CMDINFO_DSCP:
+ dscp_list_to_stream(stream);
+ return;
}
}
info_flag = CMDINFO_SIEVE;
info_stdout = TRUE;
}
+ else if (strcmpic(p, CUS"dscp") == 0)
+ {
+ info_flag = CMDINFO_DSCP;
+ info_stdout = TRUE;
+ }
else if (strcmpic(p, CUS"help") == 0)
{
info_stdout = TRUE;
extern int dns_special_lookup(dns_answer *, uschar *, int, uschar **);
extern dns_record *dns_next_rr(dns_answer *, dns_scan *, int);
extern uschar *dns_text_type(int);
+extern void dscp_list_to_stream(FILE *);
extern BOOL dscp_lookup(const uschar *, int, int *, int *, int *);
extern void enq_end(uschar *);
/* Keep both of these tables sorted! */
static struct dscp_name_tableentry dscp_table[] = {
#ifdef IPTOS_DSCP_AF11
- { "af11", IPTOS_DSCP_AF11 },
- { "af12", IPTOS_DSCP_AF12 },
- { "af13", IPTOS_DSCP_AF13 },
- { "af21", IPTOS_DSCP_AF21 },
- { "af22", IPTOS_DSCP_AF22 },
- { "af23", IPTOS_DSCP_AF23 },
- { "af31", IPTOS_DSCP_AF31 },
- { "af32", IPTOS_DSCP_AF32 },
- { "af33", IPTOS_DSCP_AF33 },
- { "af41", IPTOS_DSCP_AF41 },
- { "af42", IPTOS_DSCP_AF42 },
- { "af43", IPTOS_DSCP_AF43 },
- { "ef", IPTOS_DSCP_EF },
+ { CUS"af11", IPTOS_DSCP_AF11 },
+ { CUS"af12", IPTOS_DSCP_AF12 },
+ { CUS"af13", IPTOS_DSCP_AF13 },
+ { CUS"af21", IPTOS_DSCP_AF21 },
+ { CUS"af22", IPTOS_DSCP_AF22 },
+ { CUS"af23", IPTOS_DSCP_AF23 },
+ { CUS"af31", IPTOS_DSCP_AF31 },
+ { CUS"af32", IPTOS_DSCP_AF32 },
+ { CUS"af33", IPTOS_DSCP_AF33 },
+ { CUS"af41", IPTOS_DSCP_AF41 },
+ { CUS"af42", IPTOS_DSCP_AF42 },
+ { CUS"af43", IPTOS_DSCP_AF43 },
+ { CUS"ef", IPTOS_DSCP_EF },
#endif
#ifdef IPTOS_LOWCOST
- { "lowcost", IPTOS_LOWCOST },
+ { CUS"lowcost", IPTOS_LOWCOST },
#endif
- { "lowdelay", IPTOS_LOWDELAY },
+ { CUS"lowdelay", IPTOS_LOWDELAY },
#ifdef IPTOS_MINCOST
- { "mincost", IPTOS_MINCOST },
+ { CUS"mincost", IPTOS_MINCOST },
#endif
- { "reliability", IPTOS_RELIABILITY },
- { "throughput", IPTOS_THROUGHPUT }
+ { CUS"reliability", IPTOS_RELIABILITY },
+ { CUS"throughput", IPTOS_THROUGHPUT }
};
static int dscp_table_size =
sizeof(dscp_table) / sizeof(struct dscp_name_tableentry);
return FALSE;
}
+void
+dscp_list_to_stream(FILE *stream)
+{
+int i;
+for (i=0; i < dscp_table_size; ++i)
+ fprintf(stream, "%s\n", dscp_table[i].name);
+}
+
/* End of ip.c */
if (dscp && dscp_lookup(dscp, host_af, &dscp_level, &dscp_option, &dscp_value))
{
HDEBUG(D_transport|D_acl|D_v)
- debug_printf("DSCP \"%s\"=%d ", dscp, dscp_value);
+ debug_printf("DSCP \"%s\"=%x ", dscp, dscp_value);
if (setsockopt(sock, dscp_level, dscp_option, &dscp_value, sizeof(dscp_value)) < 0)
HDEBUG(D_transport|D_acl|D_v)
debug_printf("failed to set DSCP: %s ", strerror(errno));