summaryrefslogtreecommitdiff
path: root/libguile/socket.c
diff options
context:
space:
mode:
authorTristan Colgate-McFarlane <tcolgate@gmail.com>2010-10-20 09:36:32 +0100
committerAndy Wingo <wingo@pobox.com>2010-10-20 23:11:34 +0200
commit511246a193dc19d6fa6bc90067fb8b769f27b42c (patch)
tree9297f14e1744eaec147a0557b656166fd5bd2dd7 /libguile/socket.c
parent705a2b9bc8c74924129773f0de89f6f3d5a175b0 (diff)
Add support for more multicast sockopts.
* libguile/socket.c: Add support for IP_MULTICAST_TTL and IP_MILTICAST_IF sockopts.
Diffstat (limited to 'libguile/socket.c')
-rw-r--r--libguile/socket.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libguile/socket.c b/libguile/socket.c
index 092f6eb00..cc0175aa6 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"