diff --git a/clock.c b/clock.c index 4cca1a4..02b3a0f 100644 --- a/clock.c +++ b/clock.c @@ -204,6 +204,12 @@ static int clock_management_get_response(struct clock *c, struct port *p, datalen = sizeof(*mtd); respond = 1; break; + case PRIORITY2: + mtd = (struct management_tlv_datum *) tlv->data; + mtd->val = c->dds.priority2; + datalen = sizeof(*mtd); + respond = 1; + break; case TIME_STATUS_NP: tsn = (struct time_status_np *) tlv->data; tsn->master_offset = c->master_offset; diff --git a/pmc.c b/pmc.c index e79fa63..169b0a6 100644 --- a/pmc.c +++ b/pmc.c @@ -65,7 +65,7 @@ struct management_id idtab[] = { { "PARENT_DATA_SET", PARENT_DATA_SET, do_get_action }, { "TIME_PROPERTIES_DATA_SET", TIME_PROPERTIES_DATA_SET, do_get_action }, { "PRIORITY1", PRIORITY1, do_get_action }, - { "PRIORITY2", PRIORITY2, not_supported }, + { "PRIORITY2", PRIORITY2, do_get_action }, { "DOMAIN", DOMAIN, not_supported }, { "SLAVE_ONLY", SLAVE_ONLY, not_supported }, { "TIME", TIME, not_supported }, @@ -318,6 +318,11 @@ static void pmc_show(struct ptp_message *msg, FILE *fp) fprintf(fp, "PRIORITY1 " IFMT "priority1 %hhu", mtd->val); break; + case PRIORITY2: + mtd = (struct management_tlv_datum *) mgt->data; + fprintf(fp, "PRIORITY2 " + IFMT "priority2 %hhu", mtd->val); + break; case TIME_STATUS_NP: tsn = (struct time_status_np *) mgt->data; fprintf(fp, "TIME_STATUS_NP "