What about "ip netns exec"?
________________________________________ From: Anders Selhammer [anders.selham...@est.tech] Sent: 09 November 2018 10:25 To: linuxptp-devel@lists.sourceforge.net Subject: [Linuxptp-devel] [PATCH 2/6] config: Added network_namespace as config parameter Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- config.c | 1 + ptp4l.8 | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/config.c b/config.c index b8e7977..fef31b3 100644 --- a/config.c +++ b/config.c @@ -260,6 +260,7 @@ struct config_item config_tab[] = { PORT_ITEM_INT("min_neighbor_prop_delay", -20000000, INT_MIN, -1), PORT_ITEM_INT("neighborPropDelayThresh", 20000000, 0, INT_MAX), PORT_ITEM_INT("net_sync_monitor", 0, 0, 1), + PORT_ITEM_STR("network_namespace", ""), PORT_ITEM_ENU("network_transport", TRANS_UDP_IPV4, nw_trans_enu), GLOB_ITEM_INT("ntpshm_segment", 0, INT_MIN, INT_MAX), GLOB_ITEM_INT("offsetScaledLogVariance", 0xffff, 0, UINT16_MAX), diff --git a/ptp4l.8 b/ptp4l.8 index 99b085c..51d5b94 100644 --- a/ptp4l.8 +++ b/ptp4l.8 @@ -274,6 +274,12 @@ Relevant only with L2 transport. The default is 01:1B:19:00:00:00. The MAC address to which peer delay messages should be sent. Relevant only with L2 transport. The default is 01:80:C2:00:00:0E. .TP +.B network_namespace +The network namspace the port operates in. +This option is only used when ptp4l program is opened in default +namespace and ports are operating in other than default. +Skip this option to select default namespace. +.TP .B network_transport Select the network transport. Possible values are UDPv4, UDPv6 and L2. The default is UDPv4. -- 1.8.3.1 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel