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) {
snmp_inc_udpindatagrams();
+ *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?
regards,
Fabian
------------------------------------------------------------------------
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users