diff --git a/phc2sys.c b/phc2sys.c index 5b8a28b..18592bc 100644 --- a/phc2sys.c +++ b/phc2sys.c @@ -331,7 +331,7 @@ static int run_pmc(int wait_sync, int *utc_offset) TIME_PROPERTIES_DATA_SET }; - pmc = pmc_create(TRANS_UDS, "/tmp/phc2sys", 0, 0, 0); + pmc = pmc_create(TRANS_UDS, "/var/run/phc2sys", 0, 0, 0); if (!pmc) { fprintf(stderr, "failed to create pmc\n"); return -1; diff --git a/pmc.8 b/pmc.8 index 568b311..dfe71bb 100644 --- a/pmc.8 +++ b/pmc.8 @@ -64,7 +64,7 @@ Specify the boundary hops value in sent messages. The default is 1. Specify the domain number in sent messages. The default is 0. .TP .BI \-i " interface" -Specify the network interface. The default is /tmp/pmc for the Unix Domain +Specify the network interface. The default is /var/run/pmc for the Unix Domain Socket transport and eth0 for the other transports. .TP .BI \-t " transport-specific-field" diff --git a/pmc.c b/pmc.c index 3f94985..2736d85 100644 --- a/pmc.c +++ b/pmc.c @@ -392,7 +392,7 @@ static void usage(char *progname) " -d [num] domain number, default 0\n" " -h prints this message and exits\n" " -i [dev] interface device to use, default 'eth0'\n" - " for network and '/tmp/pmc' for UDS.\n" + " for network and '/var/run/pmc' for UDS.\n" " -t [hex] transport specific field, default 0x0\n" " -v prints the software version and exits\n" "\n", @@ -456,7 +456,7 @@ int main(int argc, char *argv[]) } if (!iface_name) { - iface_name = transport_type == TRANS_UDS ? "/tmp/pmc" : "eth0"; + iface_name = transport_type == TRANS_UDS ? "/var/run/pmc" : "eth0"; } print_set_progname(progname); diff --git a/uds.h b/uds.h index 3760eb8..24effa8 100644 --- a/uds.h +++ b/uds.h @@ -26,7 +26,7 @@ /** * Address of the server. */ -#define UDS_PATH "/tmp/ptp4l" +#define UDS_PATH "/var/run/ptp4l" /** * Allocate an instance of a UDS transport.