Re: [lwip-users] DNS using Wired interface and PPP

2019-08-11 Thread Sergey A. Borshch

On 11.08.2019 20:48, goldsi...@gmx.de wrote:

Am 11.08.2019 um 14:55 schrieb Sergey A. Borshch:

Hello everybody.

My system has two network interfaces: main is wired Ethernet and backup is
cellular modem using PPPoS. I want to choose which interface to use by
netifapi_netif_set_default().

The problem I expect that both interfaces got DNS servers addresses from
providers. It is possible that each of interface is connected to each own
subnetwork and each provider has it's own DNS servers in their subnetworks not
accessible from outside of subnetwork. It means that when I use wired Ethernet
interface I should use DNS servers supplied by Internet provider via DHCP and
using cellular modem interface I should use DNS severs supplied by cellular
operator via IPCP. What is correct way to do do such scenario in lwIP?

As far as I understood lwIP architecture, it uses two global (system-wide) DNS
addresses (by default) and each interface overwrites them after getting new
values by DHCP/IPCP. So used DNS addresses depends on which interface got their
DNS addresses last.


Well, I think you're right there. However, is this different on Linux or
some other OS? I don't know if there's any standard way of solving this.
I don't know how it is implemented internally, but I see DNS addresses fields in 
every interface settings GUI in Linux Mint and Windows 7. Possibly lwIP also 
should have DNS addresses in netif structure and access them via netif_default 
in dns_send() and dns_backupserver_available()?



This could be solved e.g. by adding an optional layer between dhcp.c and
the call to dns_setserver() so that an application can override this,
but I wouldn't want to solve this in a much different way than other
stacks...

Regards,
Simon


--
Regards,
  Sergey A. Borshchmailto: sb...@sourceforge.net
SB ELDI ltd. Riga, Latvia

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] `MEMP_NUM_PPP_PCB' undeclared here (not in a function)

2019-08-11 Thread goldsi...@gmx.de

Hi,

first: why did you send this three times?

Am 11.08.2019 um 09:15 schrieb markus.for...@gmx.ch:

Hello
I updated lwip from 2.0.3 to 2.1.2 and get the following build error
without any modifications:
memp_std.h(102): `MEMP_NUM_PPP_PCB' undeclared here (not in a function)
memp_std.h(102): size of array `memp_memory_SYS_TIMEOUT_base' has
non-integer type
memp_std.h(102): `MEMP_NUM_PPP_PCB' undeclared here (not in a function)
memp_std.h(102): initializer element is not constant
memp_std.h(102): (near initialization for `memp_SYS_TIMEOUT.num')
Thank you very much for some hints.


Seems like MEMP_NUM_SYS_TIMEOUT references MEMP_NUM_PPP_PCB. However, as
this doesn't happen in our sources, it's got to be something in your
project or header files. Try searching for the definition of
MEMP_NUM_SYS_TIMEOUT  and see where MEMP_NUM_PPP_PCB is referenced.

Regards,
Simon

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] DNS using Wired interface and PPP

2019-08-11 Thread goldsi...@gmx.de

Am 11.08.2019 um 14:55 schrieb Sergey A. Borshch:

Hello everybody.

My system has two network interfaces: main is wired Ethernet and backup is
cellular modem using PPPoS. I want to choose which interface to use by
netifapi_netif_set_default().

The problem I expect that both interfaces got DNS servers addresses from
providers. It is possible that each of interface is connected to each own
subnetwork and each provider has it's own DNS servers in their subnetworks not
accessible from outside of subnetwork. It means that when I use wired Ethernet
interface I should use DNS servers supplied by Internet provider via DHCP and
using cellular modem interface I should use DNS severs supplied by cellular
operator via IPCP. What is correct way to do do such scenario in lwIP?

As far as I understood lwIP architecture, it uses two global (system-wide) DNS
addresses (by default) and each interface overwrites them after getting new
values by DHCP/IPCP. So used DNS addresses depends on which interface got their
DNS addresses last.


Well, I think you're right there. However, is this different on Linux or
some other OS? I don't know if there's any standard way of solving this.

This could be solved e.g. by adding an optional layer between dhcp.c and
the call to dns_setserver() so that an application can override this,
but I wouldn't want to solve this in a much different way than other
stacks...

Regards,
Simon


___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

[lwip-users] DNS using Wired interface and PPP

2019-08-11 Thread Sergey A. Borshch

Hello everybody.

My system has two network interfaces: main is wired Ethernet and backup is 
cellular modem using PPPoS. I want to choose which interface to use by 
netifapi_netif_set_default().


The problem I expect that both interfaces got DNS servers addresses from 
providers. It is possible that each of interface is connected to each own 
subnetwork and each provider has it's own DNS servers in their subnetworks not 
accessible from outside of subnetwork. It means that when I use wired Ethernet 
interface I should use DNS servers supplied by Internet provider via DHCP and 
using cellular modem interface I should use DNS severs supplied by cellular 
operator via IPCP. What is correct way to do do such scenario in lwIP?


As far as I understood lwIP architecture, it uses two global (system-wide) DNS 
addresses (by default) and each interface overwrites them after getting new 
values by DHCP/IPCP. So used DNS addresses depends on which interface got their 
DNS addresses last.



--
Regards,
  Sergey A. Borshchmailto: sb...@sourceforge.net
SB ELDI ltd. Riga, Latvia

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

[lwip-users] `MEMP_NUM_PPP_PCB' undeclared here (not in a function)

2019-08-11 Thread markus . forrer
Hello

I updated lwip from 2.0.3 to 2.1.2 and get the following build error without 
any modifications:

/lwip/src/core/memp.c(79):
/lwip/src/include/lwip/priv/memp_std.h(102): `MEMP_NUM_PPP_PCB' undeclared here 
(not in a function)
/lwip/src/include/lwip/priv/memp_std.h(102): size of array 
`memp_memory_SYS_TIMEOUT_base' has non-integer type
/lwip/src/include/lwip/priv/memp_std.h(102): `MEMP_NUM_PPP_PCB' undeclared here 
(not in a function)
/lwip/src/include/lwip/priv/memp_std.h(102): initializer element is not constant
/lwip/src/include/lwip/priv/memp_std.h(102): (near initialization for 
`memp_SYS_TIMEOUT.num')

Thank you very much for some hints.

Best regards
Markus

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

[lwip-users] `MEMP_NUM_PPP_PCB' undeclared here (not in a function)

2019-08-11 Thread markus . forrer

Hello
 
I updated lwip from 2.0.3 to 2.1.2 and get the following build error without any modifications:

/lwip/src/core/memp.c(79): 
/lwip/src/include/lwip/priv/memp_std.h(102): `MEMP_NUM_PPP_PCB' undeclared here (not in a function)
/lwip/src/include/lwip/priv/memp_std.h(102): size of array `memp_memory_SYS_TIMEOUT_base' has non-integer type
/lwip/src/include/lwip/priv/memp_std.h(102): `MEMP_NUM_PPP_PCB' undeclared here (not in a function)
/lwip/src/include/lwip/priv/memp_std.h(102): initializer element is not constant
/lwip/src/include/lwip/priv/memp_std.h(102): (near initialization for `memp_SYS_TIMEOUT.num')
 
Thank you very much for some hints.
 
Best regards
Markus


___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

[lwip-users] `MEMP_NUM_PPP_PCB' undeclared here (not in a function)

2019-08-11 Thread markus . forrer
Hello

 

I updated lwip from 2.0.3 to 2.1.2 and get the following build error without any modifications:

 

memp_std.h(102): `MEMP_NUM_PPP_PCB' undeclared here (not in a function)
memp_std.h(102): size of array `memp_memory_SYS_TIMEOUT_base' has non-integer type
memp_std.h(102): `MEMP_NUM_PPP_PCB' undeclared here (not in a function)
memp_std.h(102): initializer element is not constant
memp_std.h(102): (near initialization for `memp_SYS_TIMEOUT.num')
 

Thank you very much for some hints.

 

Best regards

Markus

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users