Hi Richard,
I tried to make this changes consistent with output of TLVs which are already
implemented.
Could you please clarify the field notation for future printouts of TLV?
Will printout below be a good example?
[admin@arc-switch120 ~]# pmc -u -d 127 'GET PORT_PROPERTIES_NP'
sending: GET PORT_PROPERTIES_NP
e41d2d.fffe.446581-1 seq 0 RESPONSE MANAGEMENT PORT_PROPERTIES_NP
Port Identity: e41d2d.fffe.446581-1
Port State: MASTER
Time Stamping: 1
Interface: eth11.0
BR,
Mykola
-----Original Message-----
From: Richard Cochran [mailto:[email protected]]
Sent: Tuesday, July 18, 2017 12:17 PM
To: Mykola Zhuravel <[email protected]>
Cc: [email protected]; Eilon Greenstein
<[email protected]>; Amit Nishry <[email protected]>
Subject: Re: [Linuxptp-devel] [PATCH] pmc: support getting the port properties
np.
On Mon, Jul 17, 2017 at 05:22:29PM +0300, Mykola Zhuravel wrote:
> + case TLV_PORT_PROPERTIES_NP:
> + ppnp = (struct port_properties_np *) mgt->data;
> + if (ppnp->port_state > PS_SLAVE) {
> + ppnp->port_state = 0;
> + }
> + fprintf(fp, "PORT_PROPERTIES_NP "
> + IFMT "portIdentity %s"
> + IFMT "portState %s"
> + IFMT "timestamping %hhu"
This patch is okay as far as it goes, but can't we have a human readable string
here?
> + IFMT "interface %s",
> + pid2str(&ppnp->portIdentity), ps_str[ppnp->port_state],
> + ppnp->timestamping, text2str(&ppnp->interface));
> + break;
Thanks,
Richard
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel