Add support for the log announce interval management request.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
2044d045b4
commit
555c42e3d0
7
pmc.c
7
pmc.c
|
@ -89,7 +89,7 @@ struct management_id idtab[] = {
|
||||||
{ "NULL_MANAGEMENT", NULL_MANAGEMENT, null_management },
|
{ "NULL_MANAGEMENT", NULL_MANAGEMENT, null_management },
|
||||||
{ "CLOCK_DESCRIPTION", CLOCK_DESCRIPTION, do_get_action },
|
{ "CLOCK_DESCRIPTION", CLOCK_DESCRIPTION, do_get_action },
|
||||||
{ "PORT_DATA_SET", PORT_DATA_SET, do_get_action },
|
{ "PORT_DATA_SET", PORT_DATA_SET, do_get_action },
|
||||||
{ "LOG_ANNOUNCE_INTERVAL", LOG_ANNOUNCE_INTERVAL, not_supported },
|
{ "LOG_ANNOUNCE_INTERVAL", LOG_ANNOUNCE_INTERVAL, do_get_action },
|
||||||
{ "ANNOUNCE_RECEIPT_TIMEOUT", ANNOUNCE_RECEIPT_TIMEOUT, not_supported },
|
{ "ANNOUNCE_RECEIPT_TIMEOUT", ANNOUNCE_RECEIPT_TIMEOUT, not_supported },
|
||||||
{ "LOG_SYNC_INTERVAL", LOG_SYNC_INTERVAL, not_supported },
|
{ "LOG_SYNC_INTERVAL", LOG_SYNC_INTERVAL, not_supported },
|
||||||
{ "VERSION_NUMBER", VERSION_NUMBER, not_supported },
|
{ "VERSION_NUMBER", VERSION_NUMBER, not_supported },
|
||||||
|
@ -395,6 +395,11 @@ static void pmc_show(struct ptp_message *msg, FILE *fp)
|
||||||
p->logSyncInterval, p->delayMechanism,
|
p->logSyncInterval, p->delayMechanism,
|
||||||
p->logMinPdelayReqInterval, p->versionNumber);
|
p->logMinPdelayReqInterval, p->versionNumber);
|
||||||
break;
|
break;
|
||||||
|
case LOG_ANNOUNCE_INTERVAL:
|
||||||
|
mtd = (struct management_tlv_datum *) mgt->data;
|
||||||
|
fprintf(fp, "LOG_ANNOUNCE_INTERVAL "
|
||||||
|
IFMT "logAnnounceInterval %hhd", mtd->val);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
fprintf(fp, "\n");
|
fprintf(fp, "\n");
|
||||||
|
|
7
port.c
7
port.c
|
@ -447,6 +447,7 @@ static int port_management_get_response(struct port *target,
|
||||||
{
|
{
|
||||||
int datalen = 0, err, pdulen, respond = 0;
|
int datalen = 0, err, pdulen, respond = 0;
|
||||||
struct management_tlv *tlv;
|
struct management_tlv *tlv;
|
||||||
|
struct management_tlv_datum *mtd;
|
||||||
struct ptp_message *rsp;
|
struct ptp_message *rsp;
|
||||||
struct portDS *pds;
|
struct portDS *pds;
|
||||||
struct PortIdentity pid = port_identity(target);
|
struct PortIdentity pid = port_identity(target);
|
||||||
|
@ -557,6 +558,12 @@ static int port_management_get_response(struct port *target,
|
||||||
datalen = sizeof(*pds);
|
datalen = sizeof(*pds);
|
||||||
respond = 1;
|
respond = 1;
|
||||||
break;
|
break;
|
||||||
|
case LOG_ANNOUNCE_INTERVAL:
|
||||||
|
mtd = (struct management_tlv_datum *) tlv->data;
|
||||||
|
mtd->val = target->logAnnounceInterval;
|
||||||
|
datalen = sizeof(*mtd);
|
||||||
|
respond = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (respond) {
|
if (respond) {
|
||||||
if (datalen % 2) {
|
if (datalen % 2) {
|
||||||
|
|
Loading…
Reference in New Issue