aboutsummaryrefslogtreecommitdiff
path: root/net/zerotier/files
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2015-10-04 10:24:30 +0000
committerKurt Jaeger <pi@FreeBSD.org>2015-10-04 10:24:30 +0000
commit17053da3ca6dd9ac504121520898cb44916146ad (patch)
tree255da787719144e93d77df8d8e734404448cec25 /net/zerotier/files
parent9c7c263df730db11ae4614a45638021e4b8ddfed (diff)
downloadports-17053da3ca6dd9ac504121520898cb44916146ad.tar.gz
ports-17053da3ca6dd9ac504121520898cb44916146ad.zip
New port: net/zerotier
ZeroTier can be used for on-premise network virtualization, as a peer to peer VPN for mobile teams, for hybrid or multi-data-center cloud deployments, or just about anywhere else secure software defined virtual networking is useful. WWW: https://www.zerotier.com/ PR: 203161 Submitted by: corsmith@gmail.com
Notes
Notes: svn path=/head/; revision=398568
Diffstat (limited to 'net/zerotier/files')
-rw-r--r--net/zerotier/files/patch-node_Utils.hpp41
-rw-r--r--net/zerotier/files/zerotier.in28
2 files changed, 69 insertions, 0 deletions
diff --git a/net/zerotier/files/patch-node_Utils.hpp b/net/zerotier/files/patch-node_Utils.hpp
new file mode 100644
index 000000000000..3de3ab3665de
--- /dev/null
+++ b/net/zerotier/files/patch-node_Utils.hpp
@@ -0,0 +1,41 @@
+--- node/Utils.hpp.orig 2015-08-25 16:55:14 UTC
++++ node/Utils.hpp
+@@ -39,6 +39,10 @@
+ #include <vector>
+ #include <map>
+
++#if defined(__FreeBSD__)
++#include <sys/endian.h>
++#endif
++
+ #include "Constants.hpp"
+
+ namespace ZeroTier {
+@@ -321,8 +325,12 @@ public:
+ throw()
+ {
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+-#if defined(__GNUC__) && (!defined(__OpenBSD__))
++#if defined(__GNUC__)
++#if defined(__FreeBSD__)
++ return bswap64(n);
++#elif (!defined(__OpenBSD__))
+ return __builtin_bswap64(n);
++#endif
+ #else
+ return (
+ ((n & 0x00000000000000FFULL) << 56) |
+@@ -351,8 +359,12 @@ public:
+ throw()
+ {
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+-#if defined(__GNUC__) && !defined(__OpenBSD__)
++#if defined(__GNUC__)
++#if defined(__FreeBSD__)
++ return bswap64(n);
++#elif (!defined(__OpenBSD__))
+ return __builtin_bswap64(n);
++#endif
+ #else
+ return (
+ ((n & 0x00000000000000FFULL) << 56) |
diff --git a/net/zerotier/files/zerotier.in b/net/zerotier/files/zerotier.in
new file mode 100644
index 000000000000..40dbfbd86f0f
--- /dev/null
+++ b/net/zerotier/files/zerotier.in
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: zerotier
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add these lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# zerotier_enable (bool): Set to NO by default.
+# Set it to YES to enable zerotier.
+
+. /etc/rc.subr
+
+name=zerotier
+rcvar=zerotier_enable
+
+load_rc_config $name
+
+: ${zerotier_enable:="NO"}
+
+command=%%PREFIX%%/sbin/${name}-one
+
+command_args="-d"
+
+run_rc_command "$1"