diff --git a/msg.c b/msg.c index 9038616..a36d4d0 100644 --- a/msg.c +++ b/msg.c @@ -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; diff --git a/msg.h b/msg.h index dd8c069..985b78f 100644 --- a/msg.h +++ b/msg.h @@ -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 {