lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Question about udp_recv()


From: Pomeroy, Marty
Subject: Re: [lwip-users] Question about udp_recv()
Date: Fri, 19 Jul 2013 07:05:42 -0400

>> My question I don't see any arguments passed to  callback functions : udp_recv() and TFTPRecv().
>> How are the arguments going to be filled up and by whom??
 
 
Jin
 
After review of the udp.c code, it looks to me that udp_recv is a setup function (not a callback...)and you use it to tell lwIP what function to call with UDP traffic.  Once set up, your TFTPRecv function is called in the udp.c module by one of these two lines (in lwIP 1.4.0):
 
   mpcb->recv(mpcb->recv_arg, mpcb, q, ip_current_src_addr(), src);
...
   pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src);
 
Hope that helps!
 
Marty

reply via email to

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