From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tristan Colgate Newsgroups: gmane.lisp.guile.devel Subject: [PATCH 2/2] Add support for IP_MULTICAST_TTL and IP_MILTICAST_IF Date: Tue, 19 Oct 2010 16:32:19 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1287502401 28587 80.91.229.12 (19 Oct 2010 15:33:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Oct 2010 15:33:21 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Oct 19 17:33:19 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8EBb-0008VX-8j for guile-devel@m.gmane.org; Tue, 19 Oct 2010 17:33:11 +0200 Original-Received: from localhost ([127.0.0.1]:44189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8EBa-0004We-LF for guile-devel@m.gmane.org; Tue, 19 Oct 2010 11:33:10 -0400 Original-Received: from [140.186.70.92] (port=42170 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8EBG-0004GJ-Qh for guile-devel@gnu.org; Tue, 19 Oct 2010 11:33:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8EAn-0006xk-6x for guile-devel@gnu.org; Tue, 19 Oct 2010 11:32:50 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:37556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8EAn-0006xU-2o for guile-devel@gnu.org; Tue, 19 Oct 2010 11:32:21 -0400 Original-Received: by wyf28 with SMTP id 28so2722781wyf.0 for ; Tue, 19 Oct 2010 08:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=FKZ6VGCgsRJTS65m8HBUVpPu6l2ae6RAfZntfSU1dKg=; b=Dk7WrfCYmLAqZiUgbVB34a7u1HOdYSllCD9Cz0AtGn2H4gPCxBZosAGCIwxPzc1qfx rKS5sVyC8HqhNpEFacwQwdldgysBmiYH9ktSZjySdKcntVraxFuYr1c/tnL08s6uNjrX 6zZosFiUIZ00Oe5VnBZbmWeSsswBrSCuLLQJk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=tuR0RYlWPuzsdtlo2QpJMv7HmtEa3/Em04tAyE0VT/MTFUTZcNxR67MpPklFNiPkKM +fJme05oB5BrRUlPNTnsicQ2np23OHNgvnP4BEkLJwrd2HOLaFkkac+8+pWkTZ1MkPL5 sBOjFNp8mB6O47Gf7vbyiaWWXHaQhpFnB4BLk= Original-Received: by 10.227.152.71 with SMTP id f7mr3143387wbw.191.1287502340059; Tue, 19 Oct 2010 08:32:20 -0700 (PDT) Original-Received: by 10.216.166.84 with HTTP; Tue, 19 Oct 2010 08:32:19 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11056 Archived-At: Add a couple more socket options useful for multicast. --=20 Tristan Colgate-McFarlane ---- =A0 "You can get all your daily vitamins from 52 pints of guiness, and a glass of milk" libguile/socket.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/libguile/socket.c b/libguile/socket.c index 092f6eb..cc0175a 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -603,6 +603,16 @@ SCM_DEFINE (scm_setsockopt, "setsockopt", 4, 0, 0, "are defined (when provided by the system). See @command{man\n" "ip} for what they mean.\n" "\n" + "@defvar IP_MULTICAST_IF\n" + "This sets the source interface used by multicast traffic.\n" + "@end defvar\n" + "\n" + "@defvar IP_MULTICAST_TTL\n" + "This sets the default TTL for multicast traffic. This default= s \n" + "to 1 and should be increased to allow traffic to pass beyond the\n" + "local network.\n" + "@end defvar\n" + "\n" "@defvar IP_ADD_MEMBERSHIP\n" "@defvarx IP_DROP_MEMBERSHIP\n" "These can be used only with @code{setsockopt}, not\n" @@ -1765,6 +1775,14 @@ scm_init_socket () scm_c_define ("IP_DROP_MEMBERSHIP", scm_from_int (IP_DROP_MEMBERSHIP)); #endif +#ifdef IP_MULTICAST_TTL + scm_c_define ("IP_MULTICAST_TTL", scm_from_int ( IP_MULTICAST_TTL)); +#endif + +#ifdef IP_MULTICAST_IF + scm_c_define ("IP_MULTICAST_IF", scm_from_int ( IP_MULTICAST_IF)); +#endif + scm_add_feature ("socket"); #include "libguile/socket.x" --=20 1.7.2.3