lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Extended udp_recv callback


From: Alain M.
Subject: Re: [lwip-devel] Extended udp_recv callback
Date: Tue, 13 Jan 2009 16:33:03 -0200
User-agent: Thunderbird 2.0.0.17 (X11/20080914)


Jakob Stoklund Olesen escreveu:

I like this. Let me write a patch and get back to you.

I will do something like this:

#if UDP_EXTENDED_CALLBACK
  if (pcb->flags & UDP_FLAGS_EXTENDED_CALLBACK) {
    ((udp_extended_callback_function)pcb->recv)(pcb->recv_arg,
      pcb, p, &(iphdr->src), src, &(iphdr->dest), inp);
  } else
#endif /* UDP_EXTENDED_CALLBACK */
  {
    pcb->recv(pcb->recv_arg, pcb, p, &(iphdr->src), src);
  }

I DON'T LIKE this at all. Why ad a runtime test when a compile time already exists? it will the code only this bit bigger

Sorry for intruding,
Alain





reply via email to

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