Discussion:
Any one here have Radclock working on NetBSD?
David Lord
2014-07-08 18:31:30 UTC
Permalink
Hi

I've downloaded radclock-0.3.3 from
http://www.synclab.org/radclock/ but although some of
the files indicate it might be possible to compile on
NetBSD.I'm unable to get it to build on either
NetBSD-6/i386 or NetBSD-6.99.44/amd64.

Has anyone ported it to NetBSD?


David
Christos Zoulas
2014-07-08 20:00:09 UTC
Permalink
In article <***@netbsd.lordynet.org>,
David Lord <***@lordynet.org> wrote:
>
>Hi
>
>I've downloaded radclock-0.3.3 from
>http://www.synclab.org/radclock/ but although some of
>the files indicate it might be possible to compile on
>NetBSD.I'm unable to get it to build on either
>NetBSD-6/i386 or NetBSD-6.99.44/amd64.
>
>Has anyone ported it to NetBSD?

Here's enough to get it compiled.

christos

diff --git a/examples/radclock_capture_packet.c b/examples/radclock_capture_packet.c
index 1c8c04c..c02e854 100644
--- a/examples/radclock_capture_packet.c
+++ b/examples/radclock_capture_packet.c
@@ -41,7 +41,11 @@
#include <netinet/in.h>
#include <netinet/udp.h>
#include <netinet/ip.h>
+#ifndef __NetBSD__
#include <net/ethernet.h>
+#else
+#include <net/if_ether.h>
+#endif
#include <arpa/inet.h>

#include <pcap.h>
diff --git a/libradclock/kclock.h b/libradclock/kclock.h
index 07bff5b..ef19cfc 100644
--- a/libradclock/kclock.h
+++ b/libradclock/kclock.h
@@ -34,7 +34,7 @@
* This is very strongly inspired by the bintime structure in FreeBSD. See
* sys/time.h there for the details.
*/
-#if defined (__FreeBSD__)
+#if defined (__FreeBSD__) || defined(__NetBSD__)
#include <sys/time.h>
#else
struct bintime {
diff --git a/radclock/create_stamp.c b/radclock/create_stamp.c
index 14becba..0cf5317 100644
--- a/radclock/create_stamp.c
+++ b/radclock/create_stamp.c
@@ -31,7 +31,11 @@
#include <netinet/in_systm.h>

#include <arpa/inet.h>
+#ifndef __NetBSD__
#include <net/ethernet.h>
+#else
+#include <net/if_ether.h>
+#endif
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
diff --git a/radclock/pthread_ntpserver.c b/radclock/pthread_ntpserver.c
index 5b5ccec..d3e6b72 100644
--- a/radclock/pthread_ntpserver.c
+++ b/radclock/pthread_ntpserver.c
@@ -35,7 +35,11 @@
#include <netinet/in.h>
#include <netinet/udp.h>
#include <netinet/ip.h>
+#ifndef __NetBSD__
#include <net/ethernet.h>
+#else
+#include <net/if_ether.h>
+#endif

#include <errno.h>
#include <pthread.h>
diff --git a/radclock/radclock_main.c b/radclock/radclock_main.c
index bb26faa..9a846c7 100644
--- a/radclock/radclock_main.c
+++ b/radclock/radclock_main.c
@@ -36,7 +36,11 @@
#include <netinet/in.h>
#include <netinet/udp.h>
#include <netinet/ip.h>
+#ifndef __NetBSD__
#include <net/ethernet.h>
+#else
+#include <net/if_ether.h>
+#endif
#include <arpa/inet.h>

#include <errno.h>
diff --git a/radclock/stampinput-livepcap.c b/radclock/stampinput-livepcap.c
index 6a46378..90dcab8 100644
--- a/radclock/stampinput-livepcap.c
+++ b/radclock/stampinput-livepcap.c
@@ -29,7 +29,11 @@
#include <sys/socket.h>

#include <arpa/inet.h>
+#ifndef __NetBSD__
#include <net/ethernet.h>
+#else
+#include <net/if_ether.h>
+#endif
#include <net/if_arp.h>
#include <netinet/in.h>
David Lord
2014-07-09 00:03:18 UTC
Permalink
On 8 Jul 2014 at 20:00, Christos Zoulas wrote:

> In article <***@netbsd.lordynet.org>,
> David Lord <***@lordynet.org> wrote:
> >
> >Hi
> >
> >I've downloaded radclock-0.3.3 from
> >http://www.synclab.org/radclock/ but although some of
> >the files indicate it might be possible to compile on
> >NetBSD.I'm unable to get it to build on either
> >NetBSD-6/i386 or NetBSD-6.99.44/amd64.
> >
> >Has anyone ported it to NetBSD?
>
> Here's enough to get it compiled.
>
> christos
>
> diff --git a/examples/radclock_capture_packet.c b/examples/radclock_capture_packet.c
> index 1c8c04c..c02e854 100644
> --- a/examples/radclock_capture_packet.c
> +++ b/examples/radclock_capture_packet.c
> .....

Thanks, great!

I'll not be able to try it out until Jul 10.

The claimed improvement over stock ntpd is enormous but
I'm doubtful that the feedforward solution will adapt to
wide local temperature variations here.

My pool servers and lan pcs are below 400us rms offset vs
my local gps/pps source but I'd like to improve on that.
Original plan was to feed pps to each host but that
requires additional wiring.


David
Loading...