Hello,
I am trying to develop a TCP Client application on zedboard using lwip raw api.
I have read XAPP1026 document, and I am able to succesfully test the TCP echo server example.
But my TCP Client code application is not working, I sm monitoring the packets on wireshark on my host computer, but zedboard doesnt initiate or send SYN packet.
Can anyone suggest me where I am going wrong
Thanks
Code:
struct tcp_pcb *pcb;
pcb = tcp_new();
tcp_bind(pcb, IP_ADDR_ANY, 20000);
xil_printf("Bind error: %d", err);
struct tcp_pcb *tpcb;
tpcb = tcp_new();
struct ip_addr ipaddr;
IP4_ADDR(&ipaddr, 192, 168, 1, 10);
tcp_connect(tpcb, &ipaddr, 20000, txperf_connected_callback);
xil_printf("connect error: %d", err);
xemacif_input(netif);
tcp_write(tpcb, databuffer, 4,TCP_WRITE_FLAG_COPY);
tcp_output(tpcb);