[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Problem about the loopback
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] Problem about the loopback |
Date: |
Fri, 09 Sep 2011 13:18:51 +0100 |
On Wed, 2011-09-07 at 10:36 +0800, Aimar wrote:
> char test_data[10] = {'t', 'h', 'i','s','a','t','e','s','t','\0'};
> char test_rcv_data[10];
> const struct sockaddr test_sockaddr = {0, PF_INET, 0x30, 0x10, 0x7F, 0x00,
> 0x00, 0x01, 0,};
> struct sockaddr test_rcv_sockaddr = {0, PF_INET, 0x30, 0x10, 0x7F, 0x00,
> 0x00, 0x01, 0,};
You need to use a sockaddr_in, and specify the port you want to use.
Then if you sendto that port, and bind your receiver to the same port,
packets should get from one to the other. This is the same as for any
sockets API, so perhaps you would find it easier to get your example
working with Linux (or similar) and then port it to lwIP?
Kieran