[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wget2 | Add --bind-interface (#430)

From: Tim Rühsen
Subject: Re: wget2 | Add --bind-interface (#430)
Date: Thu, 05 Dec 2019 19:53:21 +0000

Tim Rühsen commented:

`config.bind_address` is a global option in the means that it is applied to 
every connection.

So what you would need is a function to set this value for the networking part 
of libwget (`libwget/net.c`). You would call this function from 

E.g. add a new function to net.c, `wget_tcp_set_bind_adddress()` to set the 
value from config.bind_address.
Oh, lol. There already is `void wget_tcp_set_bind_address(wget_tcp *tcp, const 
char *bind_address)`.

We already have --bind-address
        { "bind-address", &config.bind_address, parse_string, 1, 0,
                { "Bind to sockets to local address.\n",
                  "(default: automatic)\n"

So what you want to do is `--set-bind-interface`. So, add a setter for it in 
net.c and call it from wget.c/init().

Think about how we can test it in our test suite (I currently don't know how).

Reply to this email directly or view it on GitLab: 
You're receiving this email because of your account on gitlab.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]