---
* [Bug 2824] Convert update-leap to perl. (also see 2769)
-* [Bug 2832] refclock_jjy.c supports the TDC-300
+* [Bug 2832] refclock_jjy.c supports the TDC-300.
* [Bug 2834] Correct a broken html tag in html/refclock.html
+* [Bug 2837] Allow a configurable DSCP value.
---
(4.2.8p3-RC1) 2015/05/12 Released by Harlan Stenn <stenn@ntp.org>
<dd>The trap receiver will generally log event messages and other information from the server in a log file. While such monitor programs may also request their own trap dynamically, configuring a trap receiver will ensure that no messages are lost when the server is started.</dd>
<dt id="ttl"><tt>ttl <i>hop</i> ...</tt></dt>
<dd>This command specifies a list of TTL values in increasing order. up to 8 values can be specified. In manycast mode these values are used in turn in an expanding-ring search. The default is eight multiples of 32 starting at 31.</dd>
+ <dt id="dscp"><tt>dscp <i>dscp</i></tt></dt>
+ <dd>This command specifies the Differentiated Services Code Point (DSCP) value that is used in sent NTP packets. The default value is 46 for Expedited Forwarding (EF).</dd>
</dl>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
} nic_rule_action;
+extern int qos;
SOCKET move_fd(SOCKET fd);
isc_boolean_t get_broadcastclient_flag(void);
extern int is_ip_address(const char *, u_short, sockaddr_u *);
{ "ctl", T_Ctl, FOLLBY_TOKEN },
{ "disable", T_Disable, FOLLBY_TOKEN },
{ "driftfile", T_Driftfile, FOLLBY_STRING },
+{ "dscp", T_Dscp, FOLLBY_TOKEN },
{ "enable", T_Enable, FOLLBY_TOKEN },
{ "end", T_End, FOLLBY_TOKEN },
{ "filegen", T_Filegen, FOLLBY_TOKEN },
stats_config(STATS_FREQ_FILE, curr_var->value.s);
break;
+ case T_Dscp:
+ /* DSCP is in the upper 6 bits of the IP TOS/DS field */
+ qos = curr_var->value.i << 2;
+ break;
+
case T_Ident:
sys_ident = curr_var->value.s;
break;
)
{
config_nic_rules(ptree, input_from_files);
- io_open_sockets();
config_monitor(ptree);
config_auth(ptree);
config_tos(ptree);
config_ttl(ptree);
config_trap(ptree);
config_vars(ptree);
+
+ io_open_sockets();
+
config_other_modes(ptree);
config_peers(ptree);
config_unpeers(ptree);
extern int listen_to_virtual_ips;
+#ifndef IPTOS_DSCP_EF
+#define IPTOS_DSCP_EF 0xb8
+#endif
+int qos = IPTOS_DSCP_EF; /* QoS RFC3246 */
+
/*
* NIC rule entry
*/
int on = 1;
int off = 0;
-#ifndef IPTOS_DSCP_EF
-#define IPTOS_DSCP_EF 0xb8
-#endif
- int qos = IPTOS_DSCP_EF; /* QoS RFC3246 */
-
if (IS_IPV6(addr) && !ipv6_works)
return INVALID_SOCKET;
%token <Double> T_Double /* not a token */
%token <Integer> T_Driftfile
%token <Integer> T_Drop
+%token <Integer> T_Dscp
%token <Integer> T_Ellipsis /* "..." not "ellipsis" */
%token <Integer> T_Enable
%token <Integer> T_End
%type <Attr_val> log_config_command
%type <Attr_val_fifo> log_config_list
%type <Integer> misc_cmd_dbl_keyword
+%type <Integer> misc_cmd_int_keyword
%type <Integer> misc_cmd_str_keyword
%type <Integer> misc_cmd_str_lcl_keyword
%type <Attr_val> mru_option
av = create_attr_dval($1, $2);
APPEND_G_FIFO(cfgt.vars, av);
}
+ | misc_cmd_int_keyword T_Integer
+ {
+ attr_val *av;
+
+ av = create_attr_ival($1, $2);
+ APPEND_G_FIFO(cfgt.vars, av);
+ }
| misc_cmd_str_keyword T_String
{
attr_val *av;
| T_Tick
;
+misc_cmd_int_keyword
+ : T_Dscp
+ ;
+
misc_cmd_str_keyword
: T_Ident
| T_Leapfile