Provide a method to obtain a port's identity.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
b9c4fbc11d
commit
9da511d6f6
5
port.c
5
port.c
|
@ -1445,6 +1445,11 @@ int port_forward(struct port *p, struct ptp_message *msg, int msglen)
|
||||||
return cnt <= 0 ? -1 : 0;
|
return cnt <= 0 ? -1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct PortIdentity port_identity(struct port *p)
|
||||||
|
{
|
||||||
|
return p->portIdentity;
|
||||||
|
}
|
||||||
|
|
||||||
int port_manage(struct port *p, struct port *ingress, struct ptp_message *msg)
|
int port_manage(struct port *p, struct port *ingress, struct ptp_message *msg)
|
||||||
{
|
{
|
||||||
struct management_tlv *mgt;
|
struct management_tlv *mgt;
|
||||||
|
|
7
port.h
7
port.h
|
@ -90,6 +90,13 @@ enum fsm_event port_event(struct port *port, int fd_index);
|
||||||
*/
|
*/
|
||||||
int port_forward(struct port *p, struct ptp_message *msg, int msglen);
|
int port_forward(struct port *p, struct ptp_message *msg, int msglen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtain a port's identity.
|
||||||
|
* @param p A pointer previously obtained via port_open().
|
||||||
|
* @return The port identity of 'p'.
|
||||||
|
*/
|
||||||
|
struct PortIdentity port_identity(struct port *p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manage a port according to a given message.
|
* Manage a port according to a given message.
|
||||||
* @param p A pointer previously obtained via port_open().
|
* @param p A pointer previously obtained via port_open().
|
||||||
|
|
Loading…
Reference in New Issue