[Linuxptp-devel] [PATCH RFC V1 16/18] pmc: Add an accessory function for the event message socket.
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Richard C. <ric...@gm...> - 2018-01-02 04:06:14
|
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 <ric...@gm...> --- 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 |