Re: [lwip-users] SNTP client does not work

2015-02-05 Thread Karl Karpfen
2015-02-03 15:24 GMT+01:00 Simon Goldschmidt goldsi...@gmx.de:

 Karl Karpfen wrote:

 There's nothing strange here: the contents of ip_addr_t needs to be in
 network byte order and the sntp client calls a function that returns the
 correct byte order.



OK, to clarify that: to get the ip_addr_t that is used to configure my
network interface I have to do the following for IP, gateway and netmask:

ipaddr_aton(c, globalConfig.ip);
globalConfig.ip.addr=htonl(globalConfig.ip.addr);

For getting the ip_addr_t for the SNTP-server this is not neccesary, there
a plain

ipaddr_aton(c, globalConfig.sntp_ip);

works (without the need to do a htonl() on the addr member).

So this is different depending on the usage of the IP - for what reason
ever.
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] forwarding and NAT

2015-02-05 Thread Marleen Vos

On 4/02/2015 16:48, Sylvain Rochet wrote:

Hello,

On Wed, Feb 04, 2015 at 04:19:39PM +0100, Marleen Vos wrote:


Now I know NAT is out of the question, I could put my question in
another way:

The situation I have in mind is to use an embedded device as a
router, with ethernet on one end, and serial on the other end
(connected to GPRS).
There can be multiple devices connecting over the ethernet link, so
the forwarding would actually need to be able to work in this
situation too.

A connection coming in over the serial link would need port
forwarding to reach the correct address behind the router. Is that
possible with lwip?


Maybe I was unclear, lwIP does not (currently) support NAT at all.


This particular question was not about NAT, but about port forwarding.
Is that possible with lwIP?

Marleen



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5646 / Virus Database: 4281/9060 - Release Date: 02/05/15


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


Re: [lwip-users] Interfacing LwIP for a radio communication

2015-02-05 Thread Ivan Delamer

Hey Marco,

I would definitely look at the SLIP netif. I've been using it and the 
current code works.


It is basically a point to point IP encapsulation with almost no 
overhead (1 byte). It assumes that both sides already know their IP 
configuration. So you can manually assign IP addresses to each radio 
station and then create a simple driver to connect to the right station 
according to destination IP address.


Cheers
Ivan



Date: Thu, 5 Feb 2015 10:19:40 +0100
From: Marco Jakobs m...@piwos.de
To: 'Mailing list for lwIP users' lwip-users@nongnu.org
Subject: Re: [lwip-users] Interfacing LwIP for a radio communication
Message-ID: 3dfa2cbe-142d-4820-a17d-609250ae2...@piwos.de
Content-Type: text/plain; charset=utf-8

Hi,

PPPoS is unfortunately not an option. It's basically still a
point-to-point-protocol with some overhead. We're not using dedicated
P2P connections; one single packet will go to a completely different
target than the very next packet.

It's a narrow bandwith application, there is no room for establishing
a PPPoS connection, sending the data packet, end the connection,
reestablish the connection to the next radio etc.

Back to my initial idea, will this be a reasonable way to do it?

VBR
Marco




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


Re: [lwip-users] forwarding and NAT

2015-02-05 Thread bernard
Hello,
We just put a NAT implementation in our RTOS(RT-Thread) 2.0.0 release:
https://github.com/RT-Thread/rt-thread/tree/master/components/net
https://github.com/RT-Thread/rt-thread/tree/master/components/net/lwip_nat

The DHCP server also in there. Welcome to provide your feedback. We have
planning to improve it because we should use it in our Wi-Fi start kit
board. Thanks.





Best Regards,
Bernard Xiong



2015-02-05 0:20 GMT+08:00 Simon Goldschmidt goldsi...@gmx.de:

 Sylvain Rochet wrote:
  lwIP does not have NAT support, there was a task about it but it didn't
  materialise.


 I think there *was* a working implementation but the guy who uploaded the
 code to the savannah tracker later found that he did not have the right to
 do so and we deleted it.

 Anyway, this is the first question for lwIP supporting NAT in years...


 Simon

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

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

Re: [lwip-users] forwarding and NAT

2015-02-05 Thread bernard
Hi Sylvain,
This is just a light-weight implementation. Because we are making a Wi-Fi
start kit, there are two network interface:
* one is a Soft-AP, which can let user access the network. Therefore, we
use DHCP server to allocate IP address;
* one is a Wi-Fi station, which can associate an exist WLAN and access
internet.

Then the NAT is used for address translation, from the network packet of
Soft-AP to the WLAN network. I think it no need a sound, heavy realization.
This component is just available in RT-Thread RTOS. I will make the NAT
more effective and make the code style more like lwIP's, then submit it to
lwIP. Thanks.

BTW, we also port lwip-head to the RT-Thread RTOS for dual IPv4/v6 stack.
Welcome for testing too.
https://github.com/RT-Thread/rt-thread/tree/master/components/net/lwip-head



Best Regards,
Bernard Xiong



2015-02-05 20:43 GMT+08:00 Sylvain Rochet grada...@gradator.net:

 Hello Bernard,


 On Thu, Feb 05, 2015 at 05:01:33PM +0800, bernard wrote:
  Hello,
  We just put a NAT implementation in our RTOS(RT-Thread) 2.0.0 release:
  https://github.com/RT-Thread/rt-thread/tree/master/components/net
 
 https://github.com/RT-Thread/rt-thread/tree/master/components/net/lwip_nat

 Interesting, from what I understand this is only a One-to-many
 S(ource)NAT support ?  (More or less known as masquerading as well).


  The DHCP server also in there. Welcome to provide your feedback. We have
  planning to improve it because we should use it in our Wi-Fi start kit
  board.

 Sounds great, even if I don't think lwIP should be used as an IP
 router/gateway/DHCP server/… this is something which could be merged if
 it is at some point rebased against master.


 Sylvain

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

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

Re: [lwip-users] Interfacing LwIP for a radio communication

2015-02-05 Thread Marco Jakobs
Hi Ivan,

thank you for pointing to that! I'll have a look! :-)

Is there any documentation or do you have any samples which may give me a start?

Marco

-Original Message-
From: lwip-users-bounces+lwip=piwos...@nongnu.org 
[mailto:lwip-users-bounces+lwip=piwos...@nongnu.org] On Behalf Of Ivan Delamer
Sent: Thursday, February 05, 2015 4:50 PM
To: lwip-users@nongnu.org
Subject: Re: [lwip-users] Interfacing LwIP for a radio communication

Hey Marco,

I would definitely look at the SLIP netif. I've been using it and the current 
code works.

It is basically a point to point IP encapsulation with almost no overhead (1 
byte). It assumes that both sides already know their IP configuration. So you 
can manually assign IP addresses to each radio station and then create a simple 
driver to connect to the right station according to destination IP address.

Cheers
Ivan


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


Re: [lwip-users] Interfacing LwIP for a radio communication

2015-02-05 Thread Ivan Delamer
No demo or sample really. Best resources are the SLIP source code and 
maybe Wiki page on the protocol. It *is* a really simple encapsulation.


As for the rest, it's going to be fully custom to your application:

- Serial port layer: implement those SIO_xxx() methods based on your 
hardware
- Address resolution: you'll have to implement some kind of table to 
match IP address to radio link


Cheers
Ivan



Date: Thu, 5 Feb 2015 17:48:01 +0100
From: Marco Jakobs m...@piwos.de
To: 'Mailing list for lwIP users' lwip-users@nongnu.org
Subject: Re: [lwip-users] Interfacing LwIP for a radio communication
Message-ID: 1824f1a2-8949-487f-9fc2-c457bc9f2...@piwos.de
Content-Type: text/plain; charset=us-ascii

Hi Ivan,

thank you for pointing to that! I'll have a look! :-)

Is there any documentation or do you have any samples which may give 
me a start?


Marco

-Original Message-
From: lwip-users-bounces+lwip=piwos...@nongnu.org
[mailto:lwip-users-bounces+lwip=piwos...@nongnu.org] On Behalf Of Ivan
Delamer
Sent: Thursday, February 05, 2015 4:50 PM
To: lwip-users@nongnu.org
Subject: Re: [lwip-users] Interfacing LwIP for a radio communication

Hey Marco,

I would definitely look at the SLIP netif. I've been using it and the
current code works.

It is basically a point to point IP encapsulation with almost no
overhead (1 byte). It assumes that both sides already know their IP
configuration. So you can manually assign IP addresses to each radio
station and then create a simple driver to connect to the right
station according to destination IP address.

Cheers
Ivan





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


Re: [lwip-users] Interfacing LwIP for a radio communication

2015-02-05 Thread Marco Jakobs
Hi,

PPPoS is unfortunately not an option. It's basically still a 
point-to-point-protocol with some overhead. We're not using dedicated P2P 
connections; one single packet will go to a completely different target than 
the very next packet.

It's a narrow bandwith application, there is no room for establishing a PPPoS 
connection, sending the data packet, end the connection, reestablish the 
connection to the next radio etc.

Back to my initial idea, will this be a reasonable way to do it?

VBR
Marco




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


Re: [lwip-users] forwarding and NAT

2015-02-05 Thread Sylvain Rochet
Hello Marleen,

On Thu, Feb 05, 2015 at 01:20:46PM +0100, Marleen Vos wrote:
 On 4/02/2015 16:48, Sylvain Rochet wrote:
 Hello,
 
 On Wed, Feb 04, 2015 at 04:19:39PM +0100, Marleen Vos wrote:
 
 Now I know NAT is out of the question, I could put my question in
 another way:
 
 The situation I have in mind is to use an embedded device as a
 router, with ethernet on one end, and serial on the other end
 (connected to GPRS).
 There can be multiple devices connecting over the ethernet link, so
 the forwarding would actually need to be able to work in this
 situation too.
 
 A connection coming in over the serial link would need port
 forwarding to reach the correct address behind the router. Is that
 possible with lwip?
 
 Maybe I was unclear, lwIP does not (currently) support NAT at all.
 
 This particular question was not about NAT, but about port forwarding.
 Is that possible with lwIP?

Port forwarding *IS* NAT.

Sylvain


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