[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] Add support for IP_MULTICAST_TTL and IP_MILTICAST_IF
From: |
Tristan Colgate |
Subject: |
[PATCH 2/2] Add support for IP_MULTICAST_TTL and IP_MILTICAST_IF |
Date: |
Tue, 19 Oct 2010 16:32:19 +0100 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 2/2] Add support for IP_MULTICAST_TTL and IP_MILTICAST_IF,
Tristan Colgate <=