unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH 2/2] Add support for IP_MULTICAST_TTL and IP_MILTICAST_IF
@ 2010-10-19 15:32 Tristan Colgate
  0 siblings, 0 replies; only message in thread
From: Tristan Colgate @ 2010-10-19 15:32 UTC (permalink / raw)
  To: guile-devel

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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-19 15:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19 15:32 [PATCH 2/2] Add support for IP_MULTICAST_TTL and IP_MILTICAST_IF Tristan Colgate

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).