On 6/6/24 18:02, Ilias Apalodimas wrote:
> [...]
>
>>>> +
>>>> + if (!ipaddr) {
>>>> + printf("DNS: host not found\n");
>>>> + host_ipaddr.addr = 0;
>>>> + return;
>>>> + }
>>>> +
>>>> + if (var)
>>>> + env_set(var, ipstr);
>>>
>>> Do we need this? Won't this set <dns_name> == ipaddr?
>>
>> No, the syntax of the dns command is: 'dns hostname [env_var]' so one can
>> pretty much give any variable name to receive the IP address.
>>
>>> If we do not need it repurpose the void *arg and get rid of the global
>>> 'done'
>>
>> I could probably use a struct to get rid of the globals. Let me see what I
>> can do.
>
> Yea just pass a struct with char* and a bool * and you should be fine
Done in v4.
Thanks,
--
Jerome
- [PATCH v3 04/12] net-lwip: add TFTP support and tftpboot ... Jerome Forissier
- [PATCH v3 05/12] net-lwip: add ping command Jerome Forissier
- Re: [PATCH v3 05/12] net-lwip: add ping command Ilias Apalodimas
- Re: [PATCH v3 05/12] net-lwip: add ping command Ilias Apalodimas
- Re: [PATCH v3 05/12] net-lwip: add ping comm... Ilias Apalodimas
- Re: [PATCH v3 05/12] net-lwip: add ping ... Jerome Forissier
- [PATCH v3 06/12] net-lwip: add dns command Jerome Forissier
- Re: [PATCH v3 06/12] net-lwip: add dns command Ilias Apalodimas
- Re: [PATCH v3 06/12] net-lwip: add dns command Jerome Forissier
- Re: [PATCH v3 06/12] net-lwip: add dns comma... Ilias Apalodimas
- Re: [PATCH v3 06/12] net-lwip: add dns c... Jerome Forissier
- [PATCH v3 07/12] net-lwip: add wget command Jerome Forissier
- Re: [PATCH v3 07/12] net-lwip: add wget command Ilias Apalodimas
- Re: [PATCH v3 07/12] net-lwip: add wget command Jerome Forissier
- [PATCH v3 08/12] test: dm: dsa, eth: disable tests when C... Jerome Forissier
- [PATCH v3 09/12] cmd: bdinfo: enable -e when CONFIG_CMD_N... Jerome Forissier
- [PATCH v3 10/12] configs: add qemu_arm64_lwip_defconfig Jerome Forissier
- [PATCH v3 11/12] MAINTAINERS: net-lwip: add myself as a m... Jerome Forissier
- [PATCH v3 12/12] CI: add qemu_arm64_lwip to the test matr... Jerome Forissier
- [PATCH v3 01/12] net: introduce alternative implementatio... Jerome Forissier
- [PATCH v3 03/12] net-lwip: add DHCP support and dhcp comm... Jerome Forissier

