lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #14314] Implement interface name/index APIs


From: David van Moolenbroek
Subject: [lwip-devel] [task #14314] Implement interface name/index APIs
Date: Fri, 20 Jan 2017 11:48:43 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #3, task #14314 (project lwip):

Neat, Joel!

As for netif->num wrapping, honestly I was planning on just adding something
like this to netif_add():

  netif->num = netif_num++;
  ..
  init(netif);
  ..
+ LWIP_ASSERT("Your implementation creates too many netifs for interface
number auto-assignment, set netif->num from init() yourself", netif->num <
255);

..which would be just fine for me, but perhaps not for others? I don't really
like O(n^2) loops especially if I'm going to override the result anyway, but
it's probably the easiest way to implement unique IDs. I'd be happy to
implement this. There are of course many other options, including an array of
netif pointers, but then the user would need to define a LWIP_MAX_NETIFS.
Thoughts, opinions?

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?14314>

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




reply via email to

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