From: Tristan Colgate <tcolgate@gmail.com>
To: guile-devel@gnu.org
Subject: [PATCH 2/2] Add support for IP_MULTICAST_TTL and IP_MILTICAST_IF
Date: Tue, 19 Oct 2010 16:32:19 +0100 [thread overview]
Message-ID: <AANLkTikmzakafVF__JHxhd5sa80UPqXOX3KLqVTA7Bfz@mail.gmail.com> (raw)
Add a couple more socket options useful for multicast.
--
Tristan Colgate-McFarlane
----
"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 defaults \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"
--
1.7.2.3
reply other threads:[~2010-10-19 15:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikmzakafVF__JHxhd5sa80UPqXOX3KLqVTA7Bfz@mail.gmail.com \
--to=tcolgate@gmail.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).