port: Export the value of the wildcard port identity.
Code in other modules will need this special port ID value. This patch makes it available through the port header file. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
44c06f5d44
commit
0695d48332
3
port.h
3
port.h
|
@ -33,6 +33,9 @@ struct clock;
|
|||
/** Opaque type. */
|
||||
struct port;
|
||||
|
||||
/** The port identity that matches any port. */
|
||||
extern const struct PortIdentity wildcard_pid;
|
||||
|
||||
/**
|
||||
* Returns the dataset from a port's best foreign clock record, if any
|
||||
* has yet been discovered. This function does not bring the returned
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "unicast_client.h"
|
||||
#include "unicast_service.h"
|
||||
|
||||
static struct PortIdentity wildcard = {
|
||||
const struct PortIdentity wildcard_pid = {
|
||||
.clockIdentity = {
|
||||
{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
|
||||
},
|
||||
|
@ -126,7 +126,7 @@ int process_signaling(struct port *p, struct ptp_message *m)
|
|||
|
||||
/* Ignore signaling messages not addressed to this port. */
|
||||
if (!pid_eq(&m->signaling.targetPortIdentity, &p->portIdentity) &&
|
||||
!pid_eq(&m->signaling.targetPortIdentity, &wildcard)) {
|
||||
!pid_eq(&m->signaling.targetPortIdentity, &wildcard_pid)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue