lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t)


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t)
Date: Tue, 02 Feb 2010 16:00:32 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2) Gecko/20100115 Firefox/3.6

Follow-up Comment #23, bug #27352 (project lwip):

I'm thinking a bit about future here: what happens if we want to support IPv4
and v6 at the same time (and I'd very much like that - or might even need it):
At the time of writing/compiling the callbacks, you don't know which kind of
address you will receive, so we need some kind of wrapper structure that tells
us whether the address is v4 or v6. This prevents us from directly passing an
IPv4 *or* IPv6 address by value since the header (the place where you want to
copy it from) does not contain the wrapper info.

This might be too constructed, but my intention here is to change the API now
and prevent changes in the future if we can.

Sure enough, if we don't want to consider IPv6 migration now, then passing by
value is the easiest solution (especially since it helps understanding the
limited lifetime of the address - passing as a pointer might be confusing
here).

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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