[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-members] BUG: UDP recv callback returns network byte order
From: |
leon . woestenberg |
Subject: |
[lwip-members] BUG: UDP recv callback returns network byte order |
Date: |
Fri, 31 Jan 2003 16:06:15 +0100 |
Hello Jani and others,
we are experiencing problems with the latest release of lwIP.
Debugging by a collegae shows that the byte order of the
UDP source port (an argument to the recv() callback) is changed
from host byte order to network byte order.
I have changed this _back to host byte order_ and I am ready to
commit (but will hold). Unless of course there is a reason why
the API changed??
I though the idea was that the lwIP API is host byte order,
which seems We must surely document our structures and APIs
against that. I'm confused myself as well :-)
So, RFC: All API functions are host byte order.
Regards,
Leon.
diff -r1.11 -r1.12
31c31
< * $Id: udp.c,v 1.11 2003/01/22 16:18:05 jani Exp $
---
> * $Id: udp.c,v 1.12 2003/01/23 16:46:01 jani Exp $
220,222c220,221
< /* if(pcb != NULL ||
< ip_addr_cmp(&inp->ip_addr, &iphdr->dest)) {*/
< if(pcb != NULL) {
---
> if(pcb != NULL || ip_addr_cmp(&inp->ip_addr, &iphdr->dest))
> {
269c268
< pcb->recv(pcb->recv_arg, pcb, p, &(iphdr->src), src);
---
> pcb->recv(pcb->recv_arg, pcb, p, &(iphdr->src), udphdr->src);
- [lwip-members] BUG: UDP recv callback returns network byte order,
leon . woestenberg <=