[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
`src/options.c/init()`.
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,
SECTION_DOWNLOAD,
{ "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:
https://gitlab.com/gnuwget/wget2/issues/430#note_255388431
You're receiving this email because of your account on gitlab.com.
- Re: wget2 | Add --bind-interface (#430), Suhas K S, 2019/12/05
- Re: wget2 | Add --bind-interface (#430),
Tim Rühsen <=
- Re: wget2 | Add --bind-interface (#430), Suhas K S, 2019/12/05
- Re: wget2 | Add --bind-interface (#430), Tim Rühsen, 2019/12/06
- Re: wget2 | Add --bind-interface (#430), Suhas K S, 2019/12/06
- Re: wget2 | Add --bind-interface (#430), Archit Pandey, 2019/12/07
- Re: wget2 | Add --bind-interface (#430), Tim Rühsen, 2019/12/07