lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Data sending problem over TCP


From: Sanchayan
Subject: Re: [lwip-users] Data sending problem over TCP
Date: Fri, 24 Jun 2011 14:25:06 +0530

Hi,

Thanks, Kieran for the help. Now, it has started working. I didn't have the knowledge of understanding the wireshark data. What you said, i also found in the lwip source code, as below.

TCP RESET packet (empty segment with RST flag set) either to
* abort a connection or to show that there is no matching local connection
* for a received segment

We didn't have an appropriate front end utility so the connection was not getting established. One of my colleagues, wrote a Python source code for testing and what we were doing worked.

Thanks, Tim as well. Also, Tim can you elaborate your last post, of being careful when to call data outside of the interrupt context.

Thanks & Best Regards,
Sanchayan Maity.

----- Original Message ----- From: "Kieran Mansley" <address@hidden>
To: "Mailing list for lwIP users" <address@hidden>
Sent: Thursday, June 23, 2011 18:48
Subject: Re: [lwip-users] Data sending problem over TCP


On Thu, 2011-06-23 at 15:10 +0530, Sanchayan wrote:

I have attached the wireshark .pcap file. And also a screenshot of
wireshark.

That shows that the connection is being rejected by the host you're
trying to connect to, probably because there is nothing listening on
that port number.

This should result in the tcp_err() callback being triggered to notify
you that the connection has failed.  If it had succeeded the connected
callback that you can pass to tcp_connect() would be called, but I
notice that you're just giving it NULL instead.  If you take a look in
doc/rawapi.txt there's a section there on how to use tcp_connect():

- err_t tcp_connect(struct tcp_pcb *pcb, struct ip_addr *ipaddr,
                   u16_t port, err_t (* connected)(void *arg,
                                                   struct tcp_pcb
*tpcb,
                                                   err_t err));

 Sets up the pcb to connect to the remote host and sends the
 initial SYN segment which opens the connection.

 The tcp_connect() function returns immediately; it does not wait for
 the connection to be properly setup. Instead, it will call the
 function specified as the fourth argument (the "connected" argument)
 when the connection is established. If the connection could not be
 properly established, either because the other host refused the
 connection or because the other host didn't answer, the "err"
 callback function of this pcb (registered with tcp_err, see below)
 will be called.

 The tcp_connect() function can return ERR_MEM if no memory is
 available for enqueueing the SYN segment. If the SYN indeed was
 enqueued successfully, the tcp_connect() function returns ERR_OK.

Kieran


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



Disclaimer: This message (including any attachments) contains confidential information and is intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action based on the contents of this information is strictly prohibited. If you have received this email in error please notify address@hidden Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Godrej & Boyce Mfg. Co. Ltd. group of companies. The recipient should check this email and any attachments for the presence of viruses. Godrej & Boyce Mfg. Co. Ltd. group of companies accepts no liability for any damage caused by any virus transmitted by this email.



reply via email to

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