Add support for the version number management request.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
06a65003f4
commit
d30d397c2b
7
pmc.c
7
pmc.c
|
@ -92,7 +92,7 @@ struct management_id idtab[] = {
|
||||||
{ "LOG_ANNOUNCE_INTERVAL", LOG_ANNOUNCE_INTERVAL, do_get_action },
|
{ "LOG_ANNOUNCE_INTERVAL", LOG_ANNOUNCE_INTERVAL, do_get_action },
|
||||||
{ "ANNOUNCE_RECEIPT_TIMEOUT", ANNOUNCE_RECEIPT_TIMEOUT, do_get_action },
|
{ "ANNOUNCE_RECEIPT_TIMEOUT", ANNOUNCE_RECEIPT_TIMEOUT, do_get_action },
|
||||||
{ "LOG_SYNC_INTERVAL", LOG_SYNC_INTERVAL, do_get_action },
|
{ "LOG_SYNC_INTERVAL", LOG_SYNC_INTERVAL, do_get_action },
|
||||||
{ "VERSION_NUMBER", VERSION_NUMBER, not_supported },
|
{ "VERSION_NUMBER", VERSION_NUMBER, do_get_action },
|
||||||
{ "ENABLE_PORT", ENABLE_PORT, not_supported },
|
{ "ENABLE_PORT", ENABLE_PORT, not_supported },
|
||||||
{ "DISABLE_PORT", DISABLE_PORT, not_supported },
|
{ "DISABLE_PORT", DISABLE_PORT, not_supported },
|
||||||
{ "UNICAST_NEGOTIATION_ENABLE", UNICAST_NEGOTIATION_ENABLE, not_supported },
|
{ "UNICAST_NEGOTIATION_ENABLE", UNICAST_NEGOTIATION_ENABLE, not_supported },
|
||||||
|
@ -410,6 +410,11 @@ static void pmc_show(struct ptp_message *msg, FILE *fp)
|
||||||
fprintf(fp, "ANNOUNCE_RECEIPT_TIMEOUT "
|
fprintf(fp, "ANNOUNCE_RECEIPT_TIMEOUT "
|
||||||
IFMT "logSyncInterval %hhd", mtd->val);
|
IFMT "logSyncInterval %hhd", mtd->val);
|
||||||
break;
|
break;
|
||||||
|
case VERSION_NUMBER:
|
||||||
|
mtd = (struct management_tlv_datum *) mgt->data;
|
||||||
|
fprintf(fp, "VERSION_NUMBER "
|
||||||
|
IFMT "versionNumber %hhu", mtd->val);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
fprintf(fp, "\n");
|
fprintf(fp, "\n");
|
||||||
|
|
6
port.c
6
port.c
|
@ -576,6 +576,12 @@ static int port_management_get_response(struct port *target,
|
||||||
datalen = sizeof(*mtd);
|
datalen = sizeof(*mtd);
|
||||||
respond = 1;
|
respond = 1;
|
||||||
break;
|
break;
|
||||||
|
case VERSION_NUMBER:
|
||||||
|
mtd = (struct management_tlv_datum *) tlv->data;
|
||||||
|
mtd->val = target->versionNumber;
|
||||||
|
datalen = sizeof(*mtd);
|
||||||
|
respond = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (respond) {
|
if (respond) {
|
||||||
if (datalen % 2) {
|
if (datalen % 2) {
|
||||||
|
|
Loading…
Reference in New Issue