PTP header comparison macros
A set of macros to compare two ptp_uhdr structures.
Description:
Use these macros if the driver defines a function for the PTP_COMPARE_HEADER() call.
Definitions:
#define PTP_UHDR_CMP {if (!(_cmp)) { return (false); }}
#define PTP_UHDR_CMP_EQ (PTP_UHDR_CMP((_u1)->_member == (_u0)->_member))
#define PTP_UHDR_PORTNO PTP_UHDR_CMP_EQ(sourcePortId.portNumber, _u1, _u0)
#define PTP_UHDR_SEQID PTP_UHDR_CMP_EQ(sequenceId, _u1, _u0)
#define PTP_UHDR_MSGTYPE PTP_UHDR_CMP_EQ(messageType, _u1, _u0)
#define PTP_UHDR_DOMAIN PTP_UHDR_CMP_EQ(domain, _u1, _u0)
#define PTP_UHDR_CLOCKID (PTP_UHDR_CMP(memcmp(&(_u1)->sourcePortId.clockIdentity,\ &(_u0)->sourcePortId.clockIdentity, PTP_CLOCKID_LEN) == 0))
Page updated: