Reviewed-by: Jacob Keller <jacob.e.kel...@intel.com>
On 5/16/2020 8:03 AM, Richard Cochran wrote: > 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 <richardcoch...@gmail.com> > --- > port.h | 3 +++ > port_signaling.c | 4 ++-- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/port.h b/port.h > index e347e36..80c543e 100644 > --- a/port.h > +++ b/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 > diff --git a/port_signaling.c b/port_signaling.c > index c4d5469..cbd0cf4 100644 > --- a/port_signaling.c > +++ b/port_signaling.c > @@ -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; > } > > _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel