[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-members] BUG: UDP recv callback returns network byte order
From: |
Jani Monoses |
Subject: |
Re: [lwip-members] BUG: UDP recv callback returns network byte order |
Date: |
Fri, 31 Jan 2003 17:19:08 +0200 |
Ok Leon feel free to commit.
I remember looking at that and changed because socket and netconn expected that
reversed but I was confused too.
Yes we should decide on and document what byte order the raw API the netconn
API and the socket API
send and expect addresses.
Then we'll fix the places that need fixing.
Jani.
> 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 mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/lwip-members