lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] "minimal" on unix


From: Yadnesh Phadke
Subject: Re: [lwip-users] "minimal" on unix
Date: Thu, 31 Aug 2006 13:14:41 +0530

Hi all,

I am stuck with the actual communication on the network as described in earlier mail.  Has anyone used lwIP on linux? 
I think my implementation of low_level_XXX() functions is not correct.  Please provide a working sample if possible. 
I am new to Linux so the problem might be related to some basic TUN/TAP settings. 
Please help.

Regards,
Yadnesh

On 8/30/06, Yadnesh Phadke <address@hidden> wrote:
I am using "/dev/net/tun"


On 8/30/06, Yadnesh Phadke < address@hidden> wrote:
Thanks for all the help.
But I am still stuck :(

I am working on red hat Linux, using VMware. 
I have a TCP server which has called tcp_listen() and tcp_accept().
I have a TCP client that calls tcp_connect() for trying to connect to the server. 

But the server never does seem to get the packet sent by TCP connect.  Moreover I tried using a sniffing utility to watch the connection "eth0", but the packet sent by tcp_connect is never seen.  The applications low_level_xxx() functions are interacting on "/dev/tun". 
Am I doing something wrong?

Other question related to the server,
I have a select function that is waiting for the state of the network input device to change.  Once it changes the, low_level_input() is called to read the data for processing.  This logic is working only in case of "ping" request to the ip address. 
I think the device state should change for all TCP packets that come to the machine network interface.  Do I need to do some special settings?

Thanks and regards,
Yadnesh Phadke

 
On 8/29/06, Yadnesh Phadke <address@hidden> wrote:
Thanks.  But this is again a server which binds to a socket and waits for any client to connect.  The server implementation I have is similar and does not seem to have any problem. 
I am trying to write a client which would connect to this server using tcp_connect(), get some data and disconnect.  And this code does not seem to be working. 


Thanks and regards,
Yadnesh

On 8/29/06, Mumtaz Ahmad < address@hidden > wrote:
Please see this
----- Original Message -----
Sent: Tuesday, August 29, 2006 12:00 PM
Subject: Re: [lwip-users] "minimal" on unix

Thanks for replying.
I tried using tcp_connect(), with a local IP address and the same port on which the server is listening.  The tcp_connect() returned but a connection with the server was not established and the callback for tcp_connect() was never called. 
I also tried connecting using standard socket library connect.  Please help me reach the correct implementation. 
I am also new to networking, please point out any mistake in my testing.  Do you or anyone else have a sample tcp client implementation?

Currently echo.c does not seem to have it's own low_level_xxx functions.  So I was wondering whether tcp_xxx calls use a default network interface when low_level_xxx functions are not provided?

Thanks and regards,
Yadnesh

On 8/29/06, Mumtaz Ahmad <address@hidden> wrote:
Dear yadnesh
 
tcp_accept would get called if some client tries to connect on a listening port .Just pingining does not trigger tcp module .
Your second query is not clear .There is always a need of some ethernet driver to actually send the data physically on cable. So low_level_xxx functions need to be implemented
 
Ahmad
 
----- Original Message -----
Sent: Tuesday, August 29, 2006 9:52 AM
Subject: [lwip-users] "minimal" on unix

Hi All,

I am working on Linux and have just started learning about lwIP functionality.  So, studying the example ..../contrib/ports/unix/proj/minimal

There seem to be 2 different types of implementation examples provided.
1) using echo.c
    In this tcp_new(), tcp_bind(), and tcp_accept() are used. 
    I am really confused about working of this implementation.  tcp_accept() has specified echo_accept() as a callback function for all packets received over the network interface.  But echo_accept() never seems to be called when I ping the IP address. 
Could somebody please give me some pointers about what is happening here and whether I am doing something wrong?

2) using mintapif.c
    This works perfectly fine for replying to ping. 
I have the following doubts:
1) Does lwIP communicate directly over the Ethernet "eth0"?  or the "tap" driver is always required?
2) Is it mandatory for all applications to write code for low_level_init(), low_level_input(), and low_level_output() ?

Thanks and Regards,
Yadnesh Phadke


--
This message has been scanned for viruses and
dangerous content by Streaming Networks, and is
believed to be clean.


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


--
This message has been scanned for viruses and
dangerous content by Streaming Networks, and is
believed to be clean.

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users



--
This message has been scanned for viruses and
dangerous content by Streaming Networks , and is
believed to be clean.


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


--
This message has been scanned for viruses and
dangerous content by Streaming Networks, and is
believed to be clean.

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users







reply via email to

[Prev in Thread] Current Thread [Next in Thread]