diff --git a/main.cpp b/main.cpp
index 26e20220d..438144c62 100644
--- a/main.cpp
+++ b/main.cpp
@@ -83,25 +83,32 @@
#include "osnet/WindowsRoutingTable.hpp"
#define ZTCreatePlatformEthernetTapFactory (new WindowsEthernetTapFactory(homeDir))
#define ZTCreatePlatformRoutingTable (new WindowsRoutingTable())
-#endif
+#endif // __WINDOWS__
#ifdef __LINUX__
#include "osnet/LinuxEthernetTapFactory.hpp"
#include "osnet/LinuxRoutingTable.hpp"
#define ZTCreatePlatformEthernetTapFactory (new LinuxEthernetTapFactory())
#define ZTCreatePlatformRoutingTable (new LinuxRoutingTable())
-#endif
+#endif // __LINUX__
#ifdef __APPLE__
#include "osnet/OSXEthernetTapFactory.hpp"
#include "osnet/BSDRoutingTable.hpp"
#define ZTCreatePlatformEthernetTapFactory (new OSXEthernetTapFactory(homeDir,"tap.kext"))
#define ZTCreatePlatformRoutingTable (new BSDRoutingTable())
-#endif
+#endif // __APPLE__
#ifndef ZTCreatePlatformEthernetTapFactory
+#ifdef __BSD__
+#include "osnet/BSDEthernetTapFactory.hpp"
+#include "osnet/BSDRoutingTable.hpp"
+#define ZTCreatePlatformEthernetTapFactory (new BSDEthernetTapFactory())
+#define ZTCreatePlatformRoutingTable (new BSDRoutingTable())
+#else
#error Sorry, this platform has no osnet/ implementation yet. Fork me on GitHub and add one?
-#endif
+#endif // __BSD__
+#endif // ZTCreatePlatformEthernetTapFactory
using namespace ZeroTier;
diff --git a/osnet/BSDEthernetTap.cpp b/osnet/BSDEthernetTap.cpp
new file mode 100644
index 000000000..8b28510de
--- /dev/null
+++ b/osnet/BSDEthernetTap.cpp
@@ -0,0 +1,417 @@
+/*
+ * ZeroTier One - Global Peer to Peer Ethernet
+ * Copyright (C) 2011-2014 ZeroTier Networks LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * --
+ *
+ * ZeroTier may be used and distributed under the terms of the GPLv3, which
+ * are available at: http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * If you would like to embed ZeroTier into a commercial application or
+ * redistribute it in a modified binary form, please contact ZeroTier Networks
+ * LLC. Start here: http://www.zerotier.com/
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include