From 0463f2b6ca562e53c9d8bb8ae29d2efd29b55572 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 10 Jan 2009 16:50:43 +0100 Subject: [PATCH] udp sender: Make ttl configurable. --- server.ggo | 14 +++++++++++++- udp_send.c | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/server.ggo b/server.ggo index 230d1dd0..6b4770a8 100644 --- a/server.ggo +++ b/server.ggo @@ -315,7 +315,7 @@ optional 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. @@ -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. " + +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. +" diff --git a/udp_send.c b/udp_send.c index 61cab430..9e03b402 100644 --- a/udp_send.c +++ b/udp_send.c @@ -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); - /* 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; -- 2.39.2