diff --git a/phc2sys.c b/phc2sys.c
index 8f740c4..0ec1ea7 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -871,13 +871,16 @@ static void send_subscription(struct node *node)
pmc_send_set_action(node->pmc, TLV_SUBSCRIBE_EVENTS_NP, ,
sizeof(sen));
}
-static int init_pmc(struct config *cfg,
diff --git a/phc2sys.8 b/phc2sys.8
index 4fc4fa3..d66284b 100644
--- a/phc2sys.8
+++ b/phc2sys.8
@@ -20,6 +20,8 @@ phc2sys \- synchronize two or more clocks
] [
.BI \-O " offset"
] [
+.BI \-T " transport-specific-field"
+] [
.BI \-w
] [ options ]
@@ -225,6 +227,11 @@ Display a help message.
diff --git a/phc2sys.c b/phc2sys.c
index 5c54055..8f740c4 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1317,6 +1317,7 @@ int main(int argc, char *argv[])
struct config *cfg;
int autocfg = 0, rt = 0;
int c, domain_number = 0, pps_fd = -1;
+ int transport_specific = 0;
diff --git a/phc2sys.c b/phc2sys.c
index 5c54055..61ae7b0 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -871,13 +871,15 @@ static void send_subscription(struct node *node)
pmc_send_set_action(node->pmc, TLV_SUBSCRIBE_EVENTS_NP, ,
sizeof(sen));
}
-static int init_pmc(struct config *cfg,
diff --git a/phc2sys.c b/phc2sys.c
index a62d177..666ec0b 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1319,12 +1319,14 @@ int main(int argc, char *argv[])
char *src_name = NULL, *dst_name = NULL;
struct clock *src, *dst;
struct config *cfg;
+ struct option *opts;
diff --git a/phc2sys.c b/phc2sys.c
index 666ec0b..a9a72ff 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1526,6 +1526,8 @@ int main(int argc, char *argv[])
print_set_syslog(use_syslog);
print_set_level(print_level);
+ transport_specific = config_get_int(cfg, NULL,
diff --git a/phc2sys.8 b/phc2sys.8
index 4fc4fa3..fa2dbc9 100644
--- a/phc2sys.8
+++ b/phc2sys.8
@@ -8,10 +8,16 @@ phc2sys \- synchronize two or more clocks
.B \-r
] [
.B \-r
-] [ options ]
+] [
+.BI \-f " config-file"
+] [ options ] [
+.I long-options
+]
.br
.B phc2sys
[
+.BI \-f "
diff --git a/phc2sys.c b/phc2sys.c
index 61ae7b0..a62d177 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1288,6 +1288,7 @@ static void usage(char *progname)
" -O [offset]slave-master time offset (0)\n"
" -w wait for ptp4l\n"
" common
As promised, this is a set of patches to enable long options, a
specifying a configuration filele, and specifying the transportSpecific
value.
Patch 1:Add transportSpecific as parameter to init_pmc()
Patch 2:Enable configuration file on command line
Patch 3:Enable long
Hi all,
Am 08.03.2018 um 17:37 schrieb Richard Cochran:
...
Now it is time to cut the 1.9 release. If you know of any outstanding
bugs or issues, please report them right away!
I have two issues, both concerning 802.1AS:
1) ph2c2sys uses in "autodetect" (-a -r) or "wait for ptp4l" (-w) mode
diff --git a/phc2sys.8 b/phc2sys.8
index 4fc4fa3..fa2dbc9 100644
--- a/phc2sys.8
+++ b/phc2sys.8
@@ -8,10 +8,16 @@ phc2sys \- synchronize two or more clocks
.B \-r
] [
.B \-r
-] [ options ]
+] [
+.BI \-f " config-file"
+] [ options ] [
+.I long-options
+]
.br
.B phc2sys
[
+.BI \-f "
As promised, this is a set of patches to enable long options,
specifying a configuration file, and specifying the transportSpecific
value.
Patch 1:Enable configuration file on command line
Patch 2:Enable long options
Patch 3:Add transportSpecific functionality
Patch 4:
diff --git a/phc2sys.c b/phc2sys.c
index 5c54055..c2f0d8e 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1286,6 +1286,7 @@ static void usage(char *progname)
" -O [offset]slave-master time offset (0)\n"
" -w wait for ptp4l\n"
" common
Am 14.03.2018 um 14:25 schrieb Anders Selhammer:
> ...
> Why not get transportSpecific from cfg inside init_pmc() instead. Then you do
> not need to declare transport_specific in main and no need to add extra in
> parameter to init_pmc()
Yes, you're right. This would completely void Patch 1/5
diff --git a/phc2sys.c b/phc2sys.c
index c2f0d8e..278ab56 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1317,11 +1317,13 @@ int main(int argc, char *argv[])
char *src_name = NULL, *dst_name = NULL;
struct clock *src, *dst;
struct config *cfg;
+ struct option *opts;
diff --git a/phc2sys.c b/phc2sys.c
index 278ab56..c6ab788 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -877,7 +877,8 @@ static int init_pmc(struct config *cfg, struct node *node,
int domain_number)
snprintf(uds_local, sizeof(uds_local), "/var/run/phc2sys.%d",
getpid());
-
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.8 | 198 +-
1 file changed, 195 insertions(+), 3 deletions(-)
diff --git a/phc2sys.8 b/phc2sys.8
index 4fc4fa3..48bac47 100644
--- a/phc2sys.8
+++ b/phc2sys.8
@@ -1,
Use struct config item 'clock_servo' for
parameter handling. Copy this to node.servo_type afterwards.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index ad67438..5b244b2
Replaced usage of variable 'print_level'
with struct config item 'logging_level'. Original variable still used for
range checking.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/phc2sys.c b/phc2sys.c
index 1ea0600..0d69f2b 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -904,7 +904,8 @@ static int init_pmc(struct config *cfg, struct node
Copy 'node.sanity_freq_limit' to struct
config item 'sanity_freq_limit'. Check for 'servo_type' ==
CLOCK_SERVO_NTPSHM.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/phc2sys.c b/phc2sys.c
index 0d7a10c..c
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index d4f7f11..1ea0600 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1344,11 +1344,13 @@ int main(int argc, char *argv[])
This patch series changes phc2sys. It implements the possibility to use a
configuration file, enables the usage of long options and allows
configuring the transportSpecific value.
In contrast to v2 of this patch series, all (possibly) used options make
use of the config API.
Peter Schneider (12
Replaced usage of variable 'message_tag'
with struct config item 'message_tag'. Original variable removed.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index 7d5edad..b402575
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/phc2sys.c b/phc2sys.c
index c2e7f70..d4f7f11 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1313,6 +1313,7 @@ static void usage(char *pr
Replaced usage of variable 'verbose' with
struct config item 'verbose'. Original variable removed.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index b402575..edbdb85
Use struct config item 'kernel_leap' for
parameter handling. Copy this to node.kernel_leap afterwards. Check for
'servo_type' == CLOCK_SERVO_NTPSHM.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/phc
Replaced usage of variable
'domain_number' with struct config item 'domainNumber'. Original variable
still used for range checking. Removed (now obsolete) third parameter of
init_pmc().
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 13 -
1 file changed, 8 inse
Replaced usage of variable 'use_syslog'
with struct config item 'use_syslog'. Original variable removed.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index edbdb85..ad67438
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/phc2sys.c b/phc2sys.c
index 9e81052..c004066 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -904,7 +904,8 @@ static int init_pmc(struct config *cfg, struct node
Replaced usage of variable 'use_syslog' with struct config item
'use_syslog'. Original variable removed.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index c5b48fa..745b5c9
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index 4a0051f..9e81052 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1342,11 +1342,9 @@ int main(int argc, char
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.8 | 198 +-
1 file changed, 195 insertions(+), 3 deletions(-)
diff --git a/phc2sys.8 b/phc2sys.8
index 4fc4fa3..3b4b0e0 100644
--- a/phc2sys.8
+++ b/phc2sys.8
@@ -1,
Use struct config item 'clock_servo' for parameter handling. Copy this to
node.servo_type afterwards.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index 745b5c9..47284b4
Replaced usage of variable 'domain_number' with struct config item
'domainNumber'. Original variable still used for range checking. Removed
(now obsolete) third parameter of init_pmc().
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 13 -
1 file changed, 8 inse
Replaced usage of variable 'verbose' with struct config item 'verbose'.
Original variable removed.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index 9158dde..c5b48fa
Use struct config item 'kernel_leap' for parameter handling. Copy this to
node.kernel_leap afterwards. Check for 'servo_type' == CLOCK_SERVO_NTPSHM.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff
Replaced usage of variable 'print_level' with struct config item
'logging_level'. Original variable still used for range checking.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
Replaced usage of variable 'message_tag' with struct config item
'message_tag'. Original variable removed.
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index 1234a6a..9158dde
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index 494ac10..4a0051f 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1313,6 +1313,7 @@ static void usage(char *pr
In pmc, there is a little bug (only text, not functional):
When pmc is called with the management id 'LOG_SYNC_INTERVAL',
the response is '... seq 0 RESPONSE MANAGEMENT ANNOUNCE_RECEIPT_TIMEOUT' .
It should be '... seq 0 RESPONSE MANAGEMENT LOG_SYNC_INTERVAL'.
This patch fixes this.
Peter
Signed-off-by: Peter Schneider <pe...@psch.de>
---
pmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pmc.c b/pmc.c
index 209a88a..6f23167 100644
--- a/pmc.c
+++ b/pmc.c
@@ -414,7 +414,7 @@ static void pmc_show(struct ptp_message *msg, FILE *fp)
diff --git a/pmc.8 b/pmc.8
index b113c78..e4cb1e1 100644
--- a/pmc.8
+++ b/pmc.8
@@ -5,6 +5,8 @@ pmc \- PTP management client
.SH SYNOPSIS
.B pmc
[
+.BI \-f " config-file"
+] [
.B \-2
|
.B \-4
@@ -23,6 +25,8 @@ pmc \- PTP management client
] [
.BI \-t " transport-specific-field"
] [
+.I
diff --git a/pmc_common.c b/pmc_common.c
index 91fffb3..850544c 100644
--- a/pmc_common.c
+++ b/pmc_common.c
@@ -93,6 +93,10 @@ struct pmc *pmc_create(struct config *cfg, enum
transport_type transport_type,
}
strncpy(iface.name, iface_name, MAX_IFNAME_SIZE);
+ if
diff --git a/pmc.c b/pmc.c
index 7c96a4d..6b16aaf 100644
--- a/pmc.c
+++ b/pmc.c
@@ -679,13 +679,16 @@ static void usage(char *progname)
int main(int argc, char *argv[])
{
const char *iface_name = NULL;
+ char *config = NULL;
char *progname;
int c, cnt, length, tmo
for opening, instead of the field .name
(which is used the other transport layers). Therefore, the
field .name is copied here into the field .ts_label
Signed-off-by: Peter Schneider <pe...@psch.de>
---
pmc_common.c | 4
1 file changed, 4 insertions(+)
diff --git a/pmc_common.c b/pmc_co
pmc: Documentation for long opts / cfg file
Signed-off-by: Peter Schneider <pe...@psch.de>
---
pmc.8 | 71 +++
1 file changed, 71 insertions(+)
diff --git a/pmc.8 b/pmc.8
index b113c78..e4cb1e1 100644
--- a/pmc.8
+++ b
Peter Schneider (3):
pmc_common: Preset uninitialized 'iface.ts_label' with 'iface.name'
pmc: add long options and configuration file
pmc: Documentation for long opts / cfg file
pmc.8| 71
pmc.c| 61
Now trying with git send-email:
Peter Schneider (3):
pmc_common: Preset uninitialized 'iface.ts_label' with 'iface.name'
pmc: add long options and configuration file
pmc: Documentation for long opts / cfg file
pmc.8| 71
Signed-off-by: Peter Schneider <pe...@psch.de>
---
pmc.c | 61 +
1 file changed, 53 insertions(+), 8 deletions(-)
diff --git a/pmc.c b/pmc.c
index 7c96a4d..6b16aaf 100644
--- a/pmc.c
+++ b/pmc.c
@@ -679,13 +679,16 @@ static void
Signed-off-by: Peter Schneider <pe...@psch.de>
---
pmc.8 | 71 +++
1 file changed, 71 insertions(+)
diff --git a/pmc.8 b/pmc.8
index b113c78..87a343f 100644
--- a/pmc.8
+++ b/pmc.8
@@ -5,6 +5,8 @@ pmc \- PTP management clien
transport layers). Therefore, the
field .name is copied here into the field .ts_label .
Signed-off-by: Peter Schneider <pe...@psch.de>
---
pmc_common.c | 4
1 file changed, 4 insertions(+)
diff --git a/pmc_common.c b/pmc_common.c
index 91fffb3..850544c 100644
--- a/pmc_common.c
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/phc2sys.c b/phc2sys.c
index 5c54055..c2f0d8e 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1286,6 +1286,7 @@ static void usage(char *pr
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index c2f0d8e..278ab56 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1317,11 +1317,13 @@ int main(int argc, char *argv[])
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/phc2sys.c b/phc2sys.c
index 278ab56..c6ab788 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -877,7 +877,8 @@ static int init_pmc(struct config *cfg, struct node
Signed-off-by: Peter Schneider <pe...@psch.de>
---
phc2sys.8 | 103 --
1 file changed, 101 insertions(+), 2 deletions(-)
diff --git a/phc2sys.8 b/phc2sys.8
index 4fc4fa3..fa2dbc9 100644
--- a/phc2sys.8
+++ b/phc2sys.8
@@ -8,10
the transportSpecific value.
Peter Schneider (4):
phc2sys: Implement configuration file handling
phc2sys: Implement handling of Long options
phc2sys: Implement using transportSpecific value
phc2sys: Doc long opts / cfgfile handling
phc2sys.8 | 103
Am 11.01.21 um 22:30 schrieb Jacob Keller:
On 1/11/2021 9:05 AM, Richard Cochran wrote:
On Mon, Jan 11, 2021 at 10:07:41AM +0100, Miroslav Lichvar wrote:
What will happen with the "grandmaster" term? Does it stay, or should
No decision yet on that one.
it be replaced with something like
58 matches
Mail list logo