[master] add DSCP support
3535. [func] Add support for setting Differentiated Services Code Point (DSCP) values in named. Most configuration options which take a "port" option (e.g., listen-on, forwarders, also-notify, masters, notify-source, etc) can now also take a "dscp" option specifying a code point for use with outgoing traffic, if supported by the underlying OS. [RT #27596]
This commit is contained in:
@@ -303,6 +303,20 @@ cfg_obj_assockaddr(const cfg_obj_t *obj);
|
||||
* if necessary.
|
||||
*/
|
||||
|
||||
isc_dscp_t
|
||||
cfg_obj_getdscp(const cfg_obj_t *obj);
|
||||
/*%<
|
||||
* Returns the DSCP value of a configuration object representing a
|
||||
* socket address.
|
||||
*
|
||||
* Requires:
|
||||
* \li 'obj' points to a valid configuration object of a
|
||||
* socket address type.
|
||||
*
|
||||
* Returns:
|
||||
* \li DSCP value associated with a sockaddr, or -1.
|
||||
*/
|
||||
|
||||
isc_boolean_t
|
||||
cfg_obj_isnetprefix(const cfg_obj_t *obj);
|
||||
/*%<
|
||||
|
||||
@@ -157,6 +157,10 @@ struct cfg_obj {
|
||||
cfg_list_t list;
|
||||
cfg_obj_t ** tuple;
|
||||
isc_sockaddr_t sockaddr;
|
||||
struct {
|
||||
isc_sockaddr_t sockaddr;
|
||||
isc_dscp_t dscp;
|
||||
} sockaddrdscp;
|
||||
cfg_netprefix_t netprefix;
|
||||
} value;
|
||||
isc_refcount_t references; /*%< reference counter */
|
||||
@@ -237,6 +241,7 @@ struct cfg_parser {
|
||||
#define CFG_ADDR_V4PREFIXOK 0x00000002
|
||||
#define CFG_ADDR_V6OK 0x00000004
|
||||
#define CFG_ADDR_WILDOK 0x00000008
|
||||
#define CFG_ADDR_DSCPOK 0x00000010
|
||||
#define CFG_ADDR_MASK (CFG_ADDR_V6OK|CFG_ADDR_V4OK)
|
||||
/*@}*/
|
||||
|
||||
@@ -267,6 +272,7 @@ LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_qstring;
|
||||
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_astring;
|
||||
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_ustring;
|
||||
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_sockaddr;
|
||||
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_sockaddrdscp;
|
||||
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_netaddr;
|
||||
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_netaddr4;
|
||||
LIBISCCFG_EXTERNAL_DATA extern cfg_type_t cfg_type_netaddr4wild;
|
||||
@@ -325,6 +331,9 @@ cfg_lookingat_netaddr(cfg_parser_t *pctx, unsigned int flags);
|
||||
isc_result_t
|
||||
cfg_parse_rawport(cfg_parser_t *pctx, unsigned int flags, in_port_t *port);
|
||||
|
||||
isc_result_t
|
||||
cfg_parse_dscp(cfg_parser_t *pctx, isc_dscp_t *dscp);
|
||||
|
||||
isc_result_t
|
||||
cfg_parse_sockaddr(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user