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: Joel Cunningham
Subject: [lwip-devel] [task #14314] Implement interface name/index APIs
Date: Fri, 20 Jan 2017 15:03:33 +0000 (UTC)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12

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

Thanks for the quick feedback and good catch on netif->num not being unique. 
I wasn't thinking of this issue either because my use case has static netifs
(added once during power up).  Also the boundary case of netif->num being 255
can't be converted to an index

The possibility of rollover reminds me of the same issue we have with
ephemeral port selection; once the next port to be used is selected, we have
to walk the list of pcbs to ensure it's already not in use.

We could employ the same logic in netif_add(), select the next number, walk
list of netifs to ensure it's unique.  This should be less frequent than port
selection, though since our number space is much smaller (u8_t compared to
u16_t for ports) it's more conceivable that we will get closer to exhaustion. 
Anyone know of use cases for large number of netifs with LwIP?

    _______________________________________________________

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]