From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.trendhosting.net (mail1.trendhosting.net [IPv6:2001:67c:1388:1000::5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by huchra.bufferbloat.net (Postfix) with ESMTPS id 34FEC21F170 for ; Sun, 8 Sep 2013 14:57:49 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail1.trendhosting.net (Postfix) with ESMTP id CE8F7151C9; Sun, 8 Sep 2013 22:57:47 +0100 (BST) Received: from mail1.trendhosting.net ([127.0.0.1]) by localhost (thp003.trendhosting.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id kp_WhwDiB7vN; Sun, 8 Sep 2013 22:57:45 +0100 (BST) Message-ID: <522CF2D8.2050609@pocock.com.au> Date: Sun, 08 Sep 2013 23:57:44 +0200 From: Daniel Pocock User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130827 Icedove/17.0.8 MIME-Version: 1.0 To: Dave Taht References: <522CCD9E.5040706@pocock.com.au> <20130908212355.GB14461@lists.bufferbloat.net> In-Reply-To: <20130908212355.GB14461@lists.bufferbloat.net> X-Enigmail-Version: 1.5.1 Content-Type: multipart/mixed; boundary="------------060109000408080504030709" Cc: cerowrt-devel@lists.bufferbloat.net Subject: Re: [Cerowrt-devel] Bringing asio to *WRT X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2013 21:57:50 -0000 This is a multi-part message in MIME format. --------------060109000408080504030709 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 08/09/13 23:23, Dave Taht wrote: > On Sun, Sep 08, 2013 at 09:18:54PM +0200, Daniel Pocock wrote: >> >> >> >> Hi, >> >> I posted this contribution to OpenWRT but it has been ignored for almost >> 12 months: >> >> https://lists.openwrt.org/pipermail/openwrt-devel/2012-September/016771.html >> >> I've tried asio on OpenWRT and it seems to work fine, I've submitted a >> patch for it. Would it be possible to bring this directly into CeroWRT? > > We maintain a packages repo (ceropackages-3.3) for various bits of interesting > stuff. > > Certainly a decent stun/turn server in the webrtc world would be "interesting" The underlying asio library itself is general purpose - so it is not just for STUN/TURN. TURN is very compelling now that WebRTC is taking off and uses TURN by default from the browser. To give another example, asio has been used as a foundation for the websocketpp suite, which enables both client and server websocket development > It's not clear to me what else asio is - and if it is "decent enough"? > In general I am allergic to c++/boost stuff in tiny embedded systems - we have > only so much flash and ram to spare. What are the flash and memory impacts? asio itself is a header library for asynchronous, event-based programming It comes in a boost version and a non-boost version. This is the non-boost version, so it is likely to have less impact than the boost version. I confess the full solution with SIP + TURN + SSL is a little top heavy though, a device with 32MB RAM may not be enough, my WL-1043ND couldn't handle it all. On the other hand, one of these jumbo routers (I went and got a Buffalo WZR-HP-AG300H with 128MB RAM) is quite suitable and can run a full WebRTC stack as a convenient alternative to Skype. Here is a trivial asio example: http://think-async.com/Asio/asio-1.4.8/src/examples/echo/async_tcp_echo_server.cpp > Anyway, if you want to package it up I'll gladly fold it into ceropackages, > and build it, where more can fiddle with it. I've made up a patch against OpenWRT, to bring this into ceropackages do I need to adapt the patch or you can easily use it as is? Please find the Makefile attached. --------------060109000408080504030709 Content-Type: text/plain; charset=UTF-8; name="Makefile.asio" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Makefile.asio" # # Copyright (C) 2012 OpenWrt.org # Copyright (C) 2012 Daniel Pocock # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # include $(TOPDIR)/rules.mk PKG_NAME:=asio PKG_VERSION:=1.4.8 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/asio-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/asio PKG_MD5SUM:=0e2ebaa1e5569e415908c8d0ede95044 #PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk #TARGET_CFLAGS += $(FPIC) define Package/libasio SECTION:=libs CATEGORY:=Libraries DEFAULT:=m TITLE:=libasio URL:=http://think-async.com/ DEPENDS:=+boost endef define Package/libasio/description Async IO library endef define Build/Configure $(call Build/Configure/Default, --enable-maintainer-mode ) endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/include endef define Package/libasio/install $(MAKE) DESTDIR=$(PKG_INSTALL_DIR) -C $(PKG_BUILD_DIR)/include install endef define Build/InstallDev $(MAKE) DESTDIR=$(1) -C $(PKG_BUILD_DIR)/include install # $(INSTALL_DIR) $(1)/usr/include/asio # $(CP) $(PKG_INSTALL_DIR)/usr/include/asio.hpp $(1)/usr/include/ # $(CP) $(PKG_BUILD_DIR)/usr/include/asio/* $(1)/usr/include/asio/ endef $(eval $(call BuildPackage,libasio)) --------------060109000408080504030709--