From: Izunna Otiji <[email protected]>
Signed-off-by: Izunna Otiji <[email protected]>
---
pmc_common.c | 3 ++-
port.c | 6 ++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/pmc_common.c b/pmc_common.c
index 07da295..a3f2276 100644
--- a/pmc_common.c
+++ b/pmc_common.c
@@ -135,7 +135,7 @@ struct management_id idtab[] = {
{ "CLOCK_DESCRIPTION", MID_CLOCK_DESCRIPTION, do_get_action },
{ "PORT_DATA_SET", MID_PORT_DATA_SET, do_get_action },
{ "LOG_ANNOUNCE_INTERVAL", MID_LOG_ANNOUNCE_INTERVAL, do_get_action },
- { "ANNOUNCE_RECEIPT_TIMEOUT", MID_ANNOUNCE_RECEIPT_TIMEOUT,
do_get_action },
+ { "ANNOUNCE_RECEIPT_TIMEOUT", MID_ANNOUNCE_RECEIPT_TIMEOUT,
do_set_action },
{ "LOG_SYNC_INTERVAL", MID_LOG_SYNC_INTERVAL, do_get_action },
{ "VERSION_NUMBER", MID_VERSION_NUMBER, do_get_action },
{ "ENABLE_PORT", MID_ENABLE_PORT, not_supported },
@@ -196,6 +196,7 @@ static void do_set_action(struct pmc *pmc, int action, int
index, char *str)
case MID_PRIORITY2:
case MID_DOMAIN:
case MID_SLAVE_ONLY:
+ case MID_ANNOUNCE_RECEIPT_TIMEOUT:
cnt = sscanf(str, " %*s %*s %hhu", &mtd.val);
if (cnt != 1) {
fprintf(stderr, "%s SET needs 1 value\n",
diff --git a/port.c b/port.c
index 871ad68..ff0a6ca 100644
--- a/port.c
+++ b/port.c
@@ -1115,10 +1115,16 @@ static int port_management_set(struct port *target,
int respond = 0;
struct management_tlv *tlv;
struct port_ds_np *pdsnp;
+ struct management_tlv_datum *mtd;
tlv = (struct management_tlv *) req->management.suffix;
switch (id) {
+ case MID_ANNOUNCE_RECEIPT_TIMEOUT:
+ mtd = (struct management_tlv_datum *) tlv->data;
+ target->announceReceiptTimeout = mtd->val;
+ respond = 1;
+ break;
case MID_PORT_DATA_SET_NP:
pdsnp = (struct port_ds_np *) tlv->data;
target->neighborPropDelayThresh =
pdsnp->neighborPropDelayThresh;
--
2.37.2
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel