[Top][All Lists]

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

Re: [lwip-users] Loopback problems

From: address@hidden
Subject: Re: [lwip-users] Loopback problems
Date: Mon, 03 Aug 2009 17:47:34 +0200
User-agent: Thunderbird (Macintosh/20090605)

In 1.3.1, we added the function ip_current_header(), which should give you everything you need (unless I understood you wrong).


Fabian Koch wrote:

Hey all,

I still have the Problem that I can't determine a Broadcast on higher levels (netconn/netbuf), which I need. I saw the SOF_BROADCAST option added in 1.3.1, but that won't help me unless I'm willing to rewrite a lot of our code (which I'm not). The other problem is that we treat LwIP as external software and thus don't change the code. So I need to ask you whether you could take the following changes into mainline.

udp.h: Lines 66-69
*#define* UDP_FLAGS_NOCHKSUM 0x01U
*#define* UDP_FLAGS_UDPLITE  0x02U
*#define* UDP_FLAGS_CONNECTED  0x04U
+ *#define* UDP_FLAGS_IS_BROADCAST  0x08U

udp.c: Lines 280-290
    *if* (pcb != NULL) {
+      *if*(broadcast){
+        udp_setflags(pcb, udp_flags(pcb) | UDP_FLAGS_IS_BROADCAST);
+      } *else* {
+        udp_setflags(pcb, udp_flags(pcb) & ~UDP_FLAGS_IS_BROADCAST);
+      }
      /* callback */
      *if* (pcb->recv != NULL) {
        /* now the recv function is responsible for freeing p */
        pcb->recv(pcb->recv_arg, pcb, p, &(iphdr->src), src);

does this make sense for you?
Is the use of the flags field okay for this?


lwip-users mailing list

reply via email to

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