Drop incoming packets on transportSpecific mismatch.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
9bdf92a7cf
commit
6258aa0bad
11
msg.h
11
msg.h
|
@ -212,6 +212,17 @@ static inline Boolean field_is_set(struct ptp_message *m, int index, Octet bit)
|
|||
return m->header.flagField[index] & bit ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain the transportSpecific field from a message.
|
||||
* @param m Message to test.
|
||||
* @return The value of the transportSpecific field. Note that the
|
||||
* value is returned unshifted, in the upper nibble.
|
||||
*/
|
||||
static inline UInteger8 msg_transport_specific(struct ptp_message *m)
|
||||
{
|
||||
return m->header.tsmt & 0xf0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain the message type.
|
||||
* @param m Message to test.
|
||||
|
|
Loading…
Reference in New Issue