lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #45029] Several macros use ip6_2_ip() without supplyin


From: Ivan Delamer
Subject: [lwip-devel] [bug #45029] Several macros use ip6_2_ip() without supplying a storage address
Date: Wed, 06 May 2015 16:49:41 +0000
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0

Follow-up Comment #5, bug #45029 (project lwip):

I can now say that providing temporary storage addresses is becoming really
annoying to work with.

Changing netif addresses to ip_addr_t should make things much better.

In general, IPv6 code has been quite good of using API to access addresses. So
it should be an easy change there, just add an ip_2_ip6 to each macro.

IPv4 has more old code and doesn't use API, just &netif->ip_addr everywhere.
So I will create a macro:

#define netif_ip4_addr(netif) ip_2_ip4(&(netif->ip_addr))

Same for netmask and gateway. I also wonder if I should change netif->ip_addr
to netif->ip4_addr

Good news about this change, is that it should simplify UDP and TCP code as
well. I haven't gone through all of it, but there are many places using
temporary storage addresses that we could eliminate with this change.
Especially those places where we select a source address for a PCB.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?45029>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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