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: ake . forslund
Subject: Re: [lwip-users] What is a PCB and why don't I have any?
Date: Fri, 17 Jun 2011 13:29:08 +0200

Thanks for the help,

I've located my mistake. The arguments for lwip_bind() was nowhere neer anything sensible. The explanation really helped me understand where the problem could be.

Now I get a connection and a welcome message if I type =)

I'm amazed of how easy lwip is getting started with...or maybe I've been lucky =)

/A very happy Åke

-----------------------------
Åke Forslund
0433-273296
NIBE AB
Box 14
S-285 21  Markaryd
Tel +46-(0)433-273296



From: Kieran Mansley <address@hidden>
To: Mailing list for lwIP users <address@hidden>
Cc: address@hidden
Date: 2011-06-17 11:12
Subject: Re: [lwip-users] What is a PCB and why don't I have any?
Sent by: address@hidden





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


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



reply via email to

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