mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
Add support for more multicast sockopts.
* libguile/socket.c: Add support for IP_MULTICAST_TTL and IP_MILTICAST_IF sockopts.
This commit is contained in:
parent
705a2b9bc8
commit
511246a193
1 changed files with 18 additions and 0 deletions
|
@ -603,6 +603,16 @@ SCM_DEFINE (scm_setsockopt, "setsockopt", 4, 0, 0,
|
||||||
"are defined (when provided by the system). See @command{man\n"
|
"are defined (when provided by the system). See @command{man\n"
|
||||||
"ip} for what they mean.\n"
|
"ip} for what they mean.\n"
|
||||||
"\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"
|
"@defvar IP_ADD_MEMBERSHIP\n"
|
||||||
"@defvarx IP_DROP_MEMBERSHIP\n"
|
"@defvarx IP_DROP_MEMBERSHIP\n"
|
||||||
"These can be used only with @code{setsockopt}, not\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));
|
scm_c_define ("IP_DROP_MEMBERSHIP", scm_from_int (IP_DROP_MEMBERSHIP));
|
||||||
#endif
|
#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");
|
scm_add_feature ("socket");
|
||||||
|
|
||||||
#include "libguile/socket.x"
|
#include "libguile/socket.x"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue