From 00b232477d862202c0ff5ac00f5021097bf6bec7 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Wed, 8 Aug 2012 20:16:47 +0200 Subject: [PATCH] Add a configuration option to control the follow up info TLV. Signed-off-by: Richard Cochran --- config.c | 4 ++++ default.cfg | 1 + ds.h | 1 + gPTP.cfg | 1 + ptp4l.c | 1 + 5 files changed, 8 insertions(+) diff --git a/config.c b/config.c index 1704b1a..7479c9f 100644 --- a/config.c +++ b/config.c @@ -95,6 +95,10 @@ static void scan_line(char *s, struct config *cfg) pod->path_trace_enabled = val ? 1 : 0; + } else if (1 == sscanf(s, " follow_up_info %u", &val)) { + + pod->follow_up_info = val ? 1 : 0; + } else if (1 == sscanf(s, " assume_two_step %u", &val)) { *cfg->assume_two_step = val ? 1 : 0; diff --git a/default.cfg b/default.cfg index ce5d87e..2c3245c 100644 --- a/default.cfg +++ b/default.cfg @@ -21,6 +21,7 @@ announceReceiptTimeout 3 # Run time options # path_trace_enabled 0 +follow_up_info 0 tx_timestamp_retries 2 rx_timestamp_l2only 0 pi_proportional_const 0.0 diff --git a/ds.h b/ds.h index 1bb8d20..4be97cb 100644 --- a/ds.h +++ b/ds.h @@ -86,6 +86,7 @@ struct port_defaults { UInteger8 announceReceiptTimeout; UInteger8 transportSpecific; int path_trace_enabled; + int follow_up_info; }; #endif diff --git a/gPTP.cfg b/gPTP.cfg index 7e5a306..7f4c79d 100644 --- a/gPTP.cfg +++ b/gPTP.cfg @@ -21,6 +21,7 @@ announceReceiptTimeout 3 # assume_two_step 1 path_trace_enabled 1 +follow_up_info 1 tx_timestamp_retries 2 rx_timestamp_l2only 1 pi_proportional_const 0.0 diff --git a/ptp4l.c b/ptp4l.c index c810675..f6dd9c9 100644 --- a/ptp4l.c +++ b/ptp4l.c @@ -195,6 +195,7 @@ int main(int argc, char *argv[]) pod.announceReceiptTimeout = 3; pod.transportSpecific = 0; pod.path_trace_enabled = 0; + pod.follow_up_info = 0; if (generate_clock_identity(&ds.clockIdentity, iface[0].name)) { fprintf(stderr, "failed to generate a clock identity\n");