lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] What is a PCB and why don't I have any?


From: Kieran Mansley
Subject: Re: [lwip-users] What is a PCB and why don't I have any?
Date: Fri, 17 Jun 2011 10:03:10 +0100

On Fri, 2011-06-17 at 10:43 +0200, address@hidden wrote:
> The thread stops in lwip_accept() -> netconn_accept() where it is
> waiting 
> for sys_arch_mbox_fetch(&conn->acceptmbox, (void **)&newconn, 
> conn->recv_timeout) to get an answer of some sort.

OK, to answer your original question, the PCB is the internal state that
goes with each socket, and it will be set up by the call to
lwip_socket().  You shouldn't have to do anything special here.  Things
to check:

1) Try moving the lwip_listen() call out of the loop.  You should only
need to call this once, after calling lwip_socket() to create the
listening socket.

2) When lwIP receives the SYN, it should see your listening socket's PCB
in the tcp_listen_pcbs list (tcp_active_pcbs will be empty until there
is an open connection).  It checks through this list in tcp_input()
looking for one that matches the port of the incoming packet.  I would
add some debug statements there to see what is going on, and why it's
not matching your socket's PCB.

Kieran




reply via email to

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