On Mon, Nov 09, 2020 at 01:44:59PM -0800, Richard Cochran wrote: > Signed-off-by: Richard Cochran <richardcoch...@gmail.com> > --- > msg.h | 12 ++++++++++++ > phc2sys.c | 2 +- > pmc_agent.c | 18 +++++------------- > pmc_agent.h | 1 - > 4 files changed, 18 insertions(+), 15 deletions(-) > > diff --git a/msg.h b/msg.h > index b600ff0..84380da 100644 > --- a/msg.h > +++ b/msg.h > @@ -247,6 +247,18 @@ static inline uint8_t management_action(struct > ptp_message *m) > return m->management.flags & 0x0f; > } > > +/** > + * Obtain the data field from the TLV in a management message. > + * @param m A management message. > + * @return A pointer to the TLV data field. > + */ > +static inline void *management_tlv_data(struct ptp_message *msg) > +{ > + struct management_tlv *mgt; > + mgt = (struct management_tlv *) msg->management.suffix; > + return mgt->data; > +} > +
Again, great improvement already, but could you please say 'Obtain the dataField from the Management TLV in a management message' in the comments here? Some of us are not great with pattern matching, and like to have it easy. _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel