In order to implement the NetSync Monitor protocol, we will need to send
and receive PTP event messages.  This patch adds a method that allows the
pmc program to obtain the event socket.

Signed-off-by: Richard Cochran <richardcoch...@gmail.com>
---
 pmc_common.c | 5 +++++
 pmc_common.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/pmc_common.c b/pmc_common.c
index 447cf99..8c4f31f 100644
--- a/pmc_common.c
+++ b/pmc_common.c
@@ -223,6 +223,11 @@ int pmc_get_transport_fd(struct pmc *pmc)
        return pmc->fdarray.fd[FD_GENERAL];
 }
 
+int pmc_get_transport_event_fd(struct pmc *pmc)
+{
+       return pmc->fdarray.fd[FD_EVENT];
+}
+
 int pmc_send_get_action(struct pmc *pmc, int id)
 {
        int datalen, pdulen;
diff --git a/pmc_common.h b/pmc_common.h
index bb3a1f1..d5ccb29 100644
--- a/pmc_common.h
+++ b/pmc_common.h
@@ -35,6 +35,7 @@ struct pmc *pmc_create(struct config *cfg, enum 
transport_type transport_type,
 void pmc_destroy(struct pmc *pmc);
 
 int pmc_get_transport_fd(struct pmc *pmc);
+int pmc_get_transport_event_fd(struct pmc *pmc);
 
 int pmc_send_get_action(struct pmc *pmc, int id);
 
-- 
2.11.0


------------------------------------------------------------------------------
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
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to