+++ /dev/null
-#
-# Copyright (C) 2006-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=mrd6
-PKG_VERSION:=0.9.6
-PKG_RELEASE:=4
-
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
-PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/m/mrd6/
-PKG_MD5SUM:=a59d87857654ff92426062ad5664fcd6
-
-PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/mrd6
- SECTION:=net
- CATEGORY:=Network
- TITLE:=IPv6 multicast routing daemon
- URL:=http://fivebits.net/proj/mrd6
- DEPENDS:=+kmod-ipv6 +libstdcpp
-endef
-
-define Package/mrd6/description
- Multicast is becoming a major component in next generation networks, used
- in several scenarios, from video broadcasting to multimedia conferencing.
- In order to be implemented, new technology needs supporting hardware and
- software across a set of devices and systems. MRD6 is an implementation of
- a modular IPv6 Multicast Routing Framework for the Linux operating system
- and provides MLDv2 (as well as MLDv1), PIM-SM and MBGP support.
-endef
-
-MRD6_MAKEFLAGS:= \
- $(TARGET_CONFIGURE_OPTS) \
- OPTIMIZE=yes \
- SPACE_OPTIMIZE=yes \
- FULL_STATIC=no \
- CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DNO_INET6_OPTION -fno-builtin -fno-rtti" \
- LDFLAGS="$(TARGET_LDFLAGS) -ldl -lm" \
- MODULE_CXX="\$$$$(CC) -shared \$$$$(CXXFLAGS) \$$$$(LDFLAGS)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- PREFIX="/usr"
-
-define Build/Compile
- +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/src $(MRD6_MAKEFLAGS) all
-endef
-
-define Build/Install
- $(MAKE) -C $(PKG_BUILD_DIR)/src $(MRD6_MAKEFLAGS) install
-endef
-
-define Package/mrd6/conffiles
-/etc/mrd6.conf
-endef
-
-define Package/mrd6/install
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_CONF) ./files/mrd6.conf $(1)/etc
- $(INSTALL_BIN) ./files/mrd6.init $(1)/etc/init.d/mrd6
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mrd $(1)/usr/sbin/mrd6
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mrd6sh $(1)/usr/bin/mrd6sh
- $(INSTALL_DIR) $(1)/usr/lib/mrd6
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/mrd6/bgp.so $(1)/usr/lib/mrd6/bgp.so
-endef
-
-$(eval $(call BuildPackage,mrd6))
+++ /dev/null
-log {
- attach stderr normal;
- attach default "/var/log/mrd6.log" message_err;
-}
-
-interfaces disable br-lan; // Should be vlan0 + eth1 but Linux bridge seems broken for multicast
-interfaces disable eth0; // Interface to internal bridge
-handle-proper-bridge = true; // use ETH_P_ALL to see all packets on wrt54g
-
-// The default configured RP is m6bone's Renater RP.
-// Change this according to your setup
-
-groups ff00::/8 pim rp = 2001:660:3007:300:1::;
-
+++ /dev/null
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
-
-START=50
-
-start() {
- service_start /usr/sbin/mrd6 -f /etc/mrd6.conf -D
-}
-
-stop() {
- service_stop /usr/sbin/mrd6
-}
-
+++ /dev/null
---- a/include/mrd/support/ptree.h
-+++ b/include/mrd/support/ptree.h
-@@ -35,6 +35,7 @@
- #ifndef _Ptree_h_
- #define _Ptree_h_
-
-+#include <stddef.h>
- #include <stdint.h>
- #include <algorithm>
- #include <mrd/log.h>
+++ /dev/null
-Index: mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h 2007-09-21 13:19:06.000000000 +0200
-@@ -0,0 +1,41 @@
-+#include <linux/version.h>
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
-+
-+#include <linux/if_link.h>
-+#include <linux/if_addr.h>
-+#include <linux/neighbour.h>
-+
-+#ifndef IFA_RTA
-+#define IFA_RTA(r) \
-+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
-+#endif
-+#ifndef IFA_PAYLOAD
-+#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
-+#endif
-+
-+#ifndef IFLA_RTA
-+#define IFLA_RTA(r) \
-+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
-+#endif
-+#ifndef IFLA_PAYLOAD
-+#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
-+#endif
-+
-+#ifndef NDA_RTA
-+#define NDA_RTA(r) \
-+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
-+#endif
-+#ifndef NDA_PAYLOAD
-+#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg))
-+#endif
-+
-+#ifndef NDTA_RTA
-+#define NDTA_RTA(r) \
-+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg))))
-+#endif
-+#ifndef NDTA_PAYLOAD
-+#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
-+#endif
-+
-+#endif
-Index: mrd6-0.9.5/src/linux/linux_unicast_route.cpp
-===================================================================
---- mrd6-0.9.5.orig/src/linux/linux_unicast_route.cpp 2007-09-21 13:19:05.000000000 +0200
-+++ mrd6-0.9.5/src/linux/linux_unicast_route.cpp 2007-09-21 13:19:06.000000000 +0200
-@@ -23,6 +23,7 @@
- */
-
- #include <mrdpriv/linux/unicast_route.h>
-+#include <mrdpriv/linux/netlink_missing_defs.h>
-
- #include <mrd/mrd.h>
- #include <mrd/interface.h>
+++ /dev/null
---- mrd6-0.9.6.orig/src/log.cpp
-+++ mrd6-0.9.6/src/log.cpp
-@@ -667,3 +667,12 @@
- os.nprintf(32, "%p", val);
- }
-
-+#ifdef __s390__
-+const char *stream_type_format_parameter(size_t) {
-+ return "u";
-+}
-+
-+void stream_push_formated_type(base_stream &os, size_t val) {
-+ os.nprintf(32, "%z", val);
-+}
-+#endif
---- mrd6-0.9.6.orig/src/mrd.cpp
-+++ mrd6-0.9.6/src/mrd.cpp
-@@ -44,6 +44,7 @@
- #include <cstdarg>
- #include <cstdlib>
- #include <errno.h>
-+#include <climits>
-
- #include <unistd.h>
- #include <fcntl.h>
-@@ -2338,7 +2339,8 @@
-
- out.xprintf("Uptime: %{duration}\n", time_duration((time(0) - m_startup) * 1000));
- out.xprintf("Performed tasks: %u (spent %llu ms)\n", m_tasks_stat, m_tasks_time_spent);
-- out.xprintf("Registered sockets: %u reading, %u writing\n", m_read.size(), m_write.size());
-+ out.xprintf("Registered sockets: %u reading, %u writing\n",
-+ (uint32_t)m_read.size(), (uint32_t)m_write.size());
- out.xprintf("MRIB prefix count: %u\n", mrib().registry_prefix_count());
- out.xprintf("Interface count: %u\n", m_intflist.size());
- out.xprintf("Group state count: %u\n", m_grplist.size());
---- mrd6-0.9.6.orig/src/bgp/bgp.cpp
-+++ mrd6-0.9.6/src/bgp/bgp.cpp
-@@ -35,6 +35,7 @@
- #include <fcntl.h>
- #include <errno.h>
- #include <unistd.h>
-+#include <limits.h>
-
- #include <map>
-
---- mrd6-0.9.6.orig/src/linux/mrd_components.cpp
-+++ mrd6-0.9.6/src/linux/mrd_components.cpp
-@@ -92,8 +92,6 @@
- #if defined(__GLIBC__)
- #if defined(__i386__)
- return (void *)base->uc_mcontext.gregs[REG_EIP];
--#elif defined(__mips__)
-- return (void *)base->uc_mcontext.gpregs[CTX_EPC];
- #endif
- #endif
- return 0;
---- mrd6-0.9.6.orig/include/mrd/log.h
-+++ mrd6-0.9.6/include/mrd/log.h
-@@ -53,6 +53,12 @@
- void stream_push_formated_type(base_stream &, const char *val);
- void stream_push_formated_type(base_stream &, const void *val);
-
-+
-+#ifdef __s390__
-+const char *stream_type_format_parameter(size_t);
-+void stream_push_formated_type(base_stream &, size_t val);
-+#endif
-+
- /*!
- * base log stream
- */
+++ /dev/null
---- a/src/mrd.cpp
-+++ b/src/mrd.cpp
-@@ -2342,8 +2342,8 @@ bool mrd::show_info(base_stream &out, co
- out.xprintf("Registered sockets: %u reading, %u writing\n",
- (uint32_t)m_read.size(), (uint32_t)m_write.size());
- out.xprintf("MRIB prefix count: %u\n", mrib().registry_prefix_count());
-- out.xprintf("Interface count: %u\n", m_intflist.size());
-- out.xprintf("Group state count: %u\n", m_grplist.size());
-+ out.xprintf("Interface count: %u\n", (uint32_t)m_intflist.size());
-+ out.xprintf("Group state count: %u\n", (uint32_t)m_grplist.size());
-
- return true;
- }