aboutsummaryrefslogtreecommitdiffstats
path: root/package/trelay/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-28 11:02:38 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-03-28 11:02:38 +0000
commit3152e42713319401838f02a616ba8939715f0201 (patch)
treeea3504f5c5f7d282928600a4ed42474e62073a04 /package/trelay/Makefile
parent9c332859674c652eb92175ecf43573f0d668f7b9 (diff)
downloadmaster-187ad058-3152e42713319401838f02a616ba8939715f0201.tar.gz
master-187ad058-3152e42713319401838f02a616ba8939715f0201.tar.bz2
master-187ad058-3152e42713319401838f02a616ba8939715f0201.zip
add trelay, a trivial ethernet relay which allows pseudo-bridging ad-hoc or client mode devices over vlans to other hosts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31122 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/trelay/Makefile')
-rw-r--r--package/trelay/Makefile51
1 files changed, 51 insertions, 0 deletions
diff --git a/package/trelay/Makefile b/package/trelay/Makefile
new file mode 100644
index 0000000000..cbe0f045cf
--- /dev/null
+++ b/package/trelay/Makefile
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=trelay
+PKG_VERSION:=0.1
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/trelay
+ SUBMENU:=Network Support
+ TITLE:=Trivial Ethernet Relay
+ DEPENDS:=@!LINUX_2_6_30 @!LINUX_2_6_31 @!LINUX_2_6_32
+ FILES:=$(PKG_BUILD_DIR)/trelay.ko
+ AUTOLOAD:=$(call AutoLoad,50,trelay)
+endef
+
+define KernelPackage/trelay/description
+trelay relays ethernet packets between two devices (similar to a bridge), but
+without any MAC address checks. This makes it possible to bridge client mode
+or ad-hoc mode wifi devices to ethernet VLANs, assuming the remote end uses
+the same source MAC address as the device that packets are supposed to exit
+from.
+endef
+
+include $(INCLUDE_DIR)/kernel-defaults.mk
+
+define Build/Prepare
+ mkdir -p $(PKG_BUILD_DIR)
+ cp src/Makefile src/trelay.c $(PKG_BUILD_DIR)/
+endef
+
+define Build/Compile
+ $(MAKE) $(KERNEL_MAKEOPTS) SUBDIRS="$(PKG_BUILD_DIR)" modules
+endef
+
+define KernelPackage/trelay/install
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/net $(1)/etc/init.d $(1)/etc/config
+ $(INSTALL_DATA) ./files/trelay.hotplug $(1)/etc/hotplug.d/net/50-trelay
+ $(INSTALL_BIN) ./files/trelay.init $(1)/etc/init.d/trelay
+ $(INSTALL_DATA) ./files/trelay.config $(1)/etc/config/trelay
+endef
+
+$(eval $(call KernelPackage,trelay))