Re: [lwip-users] Virtual machines in the same host (bridge).

2015-02-03 Thread Valery Ushakov
Norberto R. de Goes Jr. wrote:

 - host Windows-7 Professional, 64 bits, with two virtual machines (Virtual
 Box), both  with Fedora-17 Distro, 32 bits;
 - the VM?s network configured as Internal Network
 
 I wrote a small lwip application based on unix port
 (community). It runs in VM #1 and a tap0 device is created with
 success. In the VM#2 no application is running.
[...]
 Please, are there any restriction in use the lwip library in virtual
 machines hosted on the same server? More specifically with linux
 bridge use?

This should work.  I used to have a similar setup, but I no longer
have it handy.  The following is based on my notes:

The VM where lwip ran did

  brctl addbr bridge0
  brctl addif bridge0 eth1

  ifconfig bridge0 up

once to init things.

Then tapif.c had changed

  #define IFCONFIG_ARGS tap0 up # %d.%d.%d.%d

and additional

  status = system(brctl addif bridge0 tap0);

at the end of low_level_init() since tap0 is removed from the bridge
when closed and needs to be added back when tapif.c opens it anew.

Note that neither bridge, nor tap has ip addresses configured.

-uwe


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


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

2015-02-03 Thread Simon Goldschmidt
Karl Karpfen wrote:
 Meanwhile it is working. The trick: I have to do a htonl/s() for all addresses
 that are used to configure the network interface (IP, netmask, gateway) but 
 not
 for the IP and port number of the SNTP server to be contacted.
 
 Somewhat strange but works this way.

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.


Simon

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


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

2015-02-03 Thread Karl Karpfen
Hi Sylvain,

that is not a solution since I have to parse a string containing the IP.

Meanwhile it is working. The trick: I have to do a htonl/s() for all
addresses that are used to configure the network interface (IP, netmask,
gateway) but not for the IP and port number of the SNTP server to be
contacted.

Somewhat strange but works this way.

Karl


2015-01-29 18:04 GMT+01:00 Sylvain Rochet grada...@gradator.net:

 Hi Karl,

 On Thu, Jan 29, 2015 at 05:57:50PM +0100, Karl Karpfen wrote:
  2015-01-29 15:56 GMT+01:00 Simon Goldschmidt goldsi...@gmx.de:
 
   Karl Karpfen wrote:
No but there I have to specify the IP of the NTP-server to communcate
   with
My assumption: when I have to ntohl() the netif-IP, I have to do
 that for
the NTP-IP and the port-number too. Is this wrong?
  
   Yes.
  
   Do you have evidence that there is an endianness problem here? Have you
   checked with wireshark what gets sent?
  
   BTW: ipaddr_aton already returns network byte order and udp_sendto()
 takes
   a host byte order port. Please first check your code before assuming
 bugs
   in other people's code ;-)
  
 
  Sorry but I did nowhere and never blamed somebody for bugs, I just asked
 a
  question regarding USAGE of lwIP - or isn't this allowed here in this
  maling list?

 I didn't read thoroughly, what about IP4_ADDR(*, a, b, c, d) ?

 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] SNTP client does not work

2015-02-03 Thread Sylvain Rochet
Hello Karl,

On Tue, Feb 03, 2015 at 03:08:48PM +0100, Karl Karpfen wrote:
 Hi Sylvain,
 
 that is not a solution since I have to parse a string containing the IP.
 
 Meanwhile it is working. The trick: I have to do a htonl/s() for all
 addresses that are used to configure the network interface (IP, netmask,
 gateway) but not for the IP and port number of the SNTP server to be
 contacted.
 
 Somewhat strange but works this way.

Then what about ipaddr_aton(const char *cp, ip_addr_t *addr) ?

Sylvain


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

[lwip-users] Fwd: udp_bind() gives different results for v1.3.2 vs lwip-master branch

2015-02-03 Thread Robert Deschambault
Hi all,



I was reviewing our old code and we had a redundant call to the
initialization code for the UDP services.  Seems moving to the latest lwip
master branch sources has fixed some issues with our legacy code!



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