|
From: | Jin Won Seo |
Subject: | Re: [lwip-users] Are UDP packets received at tcpip stack in lwip1.3.2 +safeRTOS |
Date: | Fri, 26 Jul 2013 08:54:09 -0700 |
JinI have 1.4.0 and this is how it works there:Make sure you have LWIP_UDP set to 1 in lwipopts.h. Then udp_input() is called from ip_input() if it is a UDP packet type.Hope that helps!Marty
From: lwip-users-bounces+martypomeroy=address@hidden [mailto:lwip-users-bounces+martypomeroy=address@hidden] On Behalf Of Jin Won Seo
Sent: Tuesday, July 23, 2013 3:47 PM
To: Mailing list for lwIP users
Subject: [lwip-users] Are UDP packets received at tcpip stack in lwip1.3.2 +safeRTOSThanks,I know UDP and TCP/IP are different, but I don't how I can receive UDP packets using lwip+safeRTOS.I am not sure once UDP packets are received, they get through this codes. safeRtos seems like only binding tcpip stack, so I am now tracing lwip codes to see if UDP packets can be received from tcpip_init(lwiPPrivateInit,0) in lwip+safeRTOS.sys_mbox_fetch(mbox, (void *)&msg);Depending on received message's type either ethernet_input() or ip_input() are executed.Then tcpip_thread() is called in tcpip.cNow I am analyzing lwip1.3.2 codes and if RTOS is used then call tcpip_init(lwIPPrivateInit, 0) in lwiplib.c.Hi all,My project uses StellarisWare+lwip1.3.2+BOOTP+TFTP.
switch (msg->type) {
case TCPIP_MSG_INPKT:
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg));
#if LWIP_ARP
if (msg->msg.inp.netif->flags & NETIF_FLAG_ETHARP) {
ethernet_input(msg->msg.inp.p, msg->msg.inp.netif);
} else
#endif /* LWIP_ARP */
{
ip_input(msg->msg.inp.p, msg->msg.inp.netif);
}
memp_free(MEMP_TCPIP_MSG_INPKT, msg);
break;
case TCPIP_MSG_CALLBACK:
......
......
}
Jin
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
[Prev in Thread] | Current Thread | [Next in Thread] |