msg: Allow tacking a TLV onto a delay request message.

This will be needed in order to support the NetSync Monitor protocol.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2017-11-25 11:03:07 -08:00
parent 613f005996
commit 9d48046e95
2 changed files with 3 additions and 1 deletions

3
msg.c
View File

@ -116,7 +116,7 @@ static uint8_t *msg_suffix(struct ptp_message *m)
case SYNC:
return NULL;
case DELAY_REQ:
return NULL;
return m->delay_req.suffix;
case PDELAY_REQ:
return NULL;
case PDELAY_RESP:
@ -354,6 +354,7 @@ int msg_post_recv(struct ptp_message *m, int cnt)
timestamp_post_recv(m, &m->sync.originTimestamp);
break;
case DELAY_REQ:
suffix = m->delay_req.suffix;
break;
case PDELAY_REQ:
break;

1
msg.h
View File

@ -114,6 +114,7 @@ struct sync_msg {
struct delay_req_msg {
struct ptp_header hdr;
struct Timestamp originTimestamp;
uint8_t suffix[0];
} PACKED;
struct follow_up_msg {