lwip-members
[Top][All Lists]
Advanced

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

Re: [lwip-members] BUG: UDP recv callback returns network byte order


From: leon . woestenberg
Subject: Re: [lwip-members] BUG: UDP recv callback returns network byte order
Date: Fri, 31 Jan 2003 16:58:35 +0100

Hello Jani and others,

my strong preference is for:

lwIP API's being host-order (we may need small changes to reflect this).
keep PCBs are host-order.
keep network packets headers in network-order.

Consensus and comments needed as this is essential to fix before
starting further developments.

Regards,

Leon.







|---------+-------------------------------------------------------->
|         |           Jani Monoses <address@hidden>                    |
|         |           Sent by:                                     |
|         |           lwip-members-bounces+leon.woestenberg=axon.tv|
|         |           @nongnu.org                                  |
|         |                                                        |
|         |                                                        |
|         |           31-01-2003 16:19                             |
|         |                                                        |
|---------+-------------------------------------------------------->
  
>----------------------------------------------------------------------------------------------|
  |                                                                             
                 |
  |       To:       address@hidden                                              
        |
  |       cc:                                                                   
                 |
  |       Subject:  Re: [lwip-members] BUG: UDP recv callback returns network 
byte order         |
  
>----------------------------------------------------------------------------------------------|




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


_______________________________________________
lwip-members mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/lwip-members








reply via email to

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