lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] UDP server - answer problem


From: Przemek Wirkus
Subject: [lwip-users] UDP server - answer problem
Date: 21 Sep 2005 10:56:41 +0200

Hi, 

I have written a UDP server using RAW API (lwIP 0.5.3 - on linux).
I can receive data correctly but when I send something to my UDP client
(not written in lwIP) he is not receiving any data.

Code looks like this:

// Server at: 192.168.0.2:12024
// Client 

UDP_PORT = 12024

IP4_ADDR(&udp_addr, 192,168,0,1);

udp_conn = udp_new();
udp_connect(udp_conn, &udp_addr, UDP_PORT);
udp_recv(udp_conn, my_udp_recv, NULL);
udp_bind(udp_conn, IP_ADDR_ANY, UDP_PORT);

...

when I try to send the data I do:

udp_pbuf = pbuf_alloc(PBUF_TRANSPORT, cp_udp.m_size, PBUF_RAM);
// Filling pbuf
udp_send(udp_conn, udp_temp_ptr);
pbuf_free(udp_pbuf);

// ----

tcp_dump:
08:48:01.998649 192.168.0.2.12024 > 192.168.0.1.12024: udp 25 (DF)
08:48:01.998680 192.168.0.1 > 192.168.0.2: icmp: 192.168.0.1 udp port
12024 unreachable [tos 0xc0]

netstat -punta: // My client program
udp 0 0 0.0.0.0:32783 0.0.0.0:* 6332/udpkli


My UDP client works OK with other non lwIP serwers :\ I do not have any
problems with TCP send and recv under lwIP.

I would be grateful for any sample code and/or suggestions. 
Help please !!!

--
przemek wirkus






reply via email to

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