]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
udp sender: Make ttl configurable.
authorAndre Noll <maan@systemlinux.org>
Sat, 10 Jan 2009 15:50:43 +0000 (16:50 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 10 Jan 2009 15:50:43 +0000 (16:50 +0100)
server.ggo
udp_send.c

index 230d1dd0708255d43dc714421bf0bfd5c2f7873b..6b4770a8816e728767157a31912bf1cbb9d24987 100644 (file)
@@ -315,7 +315,7 @@ optional
 multiple
 details="
        Add given host/port to the list of targets.  This option
 multiple
 details="
        Add given host/port to the list of targets.  This option
-       can be given multiple times.  Example: '224.0.1.38:1500'
+       can be given multiple times. Example: '224.0.1.38:1500'
        instructs the udp sender to send to udp port 1500 on host
        224.0.1.38 (unassigned ip in the Local Network Control Block
        224.0.0/24). This is useful for multicast streaming.
        instructs the udp sender to send to udp port 1500 on host
        224.0.1.38 (unassigned ip in the Local Network Control Block
        224.0.0/24). This is useful for multicast streaming.
@@ -353,3 +353,15 @@ details="
        that this affects only ogg vorbis streams as this is the only
        audio format that needs an audio file header.
 "
        that this affects only ogg vorbis streams as this is the only
        audio format that needs an audio file header.
 "
+
+option "udp_ttl" t
+#~~~~~~~~~~~~~~~~~
+"set time to live value"
+int typestr="num"
+default="10"
+optional
+details="
+       This option instructs the udp sender to set the time to live to
+       \"num\" for the sending udp socket. Only useful for multicast
+       udp streaming.
+"
index 61cab430c04dca75f1e89c5e4821be3b24328dfe..9e03b402fe18d2a9d0584c2653a8d7baeb78af35 100644 (file)
@@ -79,8 +79,8 @@ static int udp_init_session(struct udp_target *ut)
        if (ut->fd >= 0) /* nothing to do */
                return 0;
        PARA_NOTICE_LOG("sending to udp %s:%d\n", TARGET_ADDR(ut), ut->port);
        if (ut->fd >= 0) /* nothing to do */
                return 0;
        PARA_NOTICE_LOG("sending to udp %s:%d\n", TARGET_ADDR(ut), ut->port);
-       /* TODO: Make ttl configurable. */
-       ret = create_udp_send_socket(TARGET_ADDR(ut), ut->port, 10);
+       ret = create_udp_send_socket(TARGET_ADDR(ut), ut->port,
+               conf.udp_ttl_arg);
        if (ret < 0)
                return ret;
        ut->fd = ret;
        if (ret < 0)
                return ret;
        ut->fd = ret;