lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #57710] Unable to reinitialize the TCP connection


From: Praveen Kumar
Subject: [lwip-devel] [bug #57710] Unable to reinitialize the TCP connection
Date: Mon, 3 Feb 2020 05:35:05 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36

Follow-up Comment #2, bug #57710 (project lwip):

Hi Benjamin,
 Thanks for reply. I have tried whatever you suggested but after client
stopped transmission, i control is stuck in function "void mld6_tmr(void)".

Do i need to do something to come out this function? like removing netif
something like that.

I am adding following steps during lwip init.
        TCPIP_STACK_INTERFACE_0_init(st_ETH_ConfigStruct.u8_SourceMacAddress, 
Src_IP,
gw);           
netif_set_up(&TCPIP_STACK_INTERFACE_0_desc);

netif_set_default(&TCPIP_STACK_INTERFACE_0_desc);
mac_async_enable(&MACIF);

etharp_add_static_entry(&Dest_IP, (struct eth_addr
*)&st_ETH_ConfigStruct.u8_DestMacAddress[0]);

pcb_tcp = tcp_new();

error = tcp_bind(pcb_tcp, &address, st_ETH_ConfigStruct.u16_SourcePortNum);

pcb_tcp = tcp_listen(pcb_tcp);

tcp_accept(pcb_tcp, Etherdo_connected);

After link established, below functions are used to do data transfer.

tcp_write(pcb_tcp,u8_DataBuff,u16_DataLen,TCP_WRITE_FLAG_MORE);
tcp_output(pcb_tcp));


This is how i initialized LWIP stack and transmitting data over ethernet. Here
i have used static MAC address as we should connect to particular MAC
address.

now if i try to re-initialize all the setting after tcp_close() or
tcp_shutdown(pcb_tcp, 1, 1);  or tcp_abort(pcb_tcp); , i am stucking in same
function "void mld6_tmr(void)".

Can you please suggest me what all the functions i should use to clear all old
tcp_pcb details and create new tcp_pcb which work as bootup time
initialization.

i have tried netif_set_down(), etharp_remove_static_entry() and some other
functions to clear all the old pcb related data and tried creating new pcb but
still i have the same issue.

Please suggest me something here.


Regards,
PraveenKumar.








    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?57710>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

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