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: Thu, 9 Feb 2017 10:24:42 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0

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

> If I have a "netif" version of this structure[..] So I'm trying to think of
an API that makes sense at the netif layer and can be easily re-used at the
if_api layer

Just my 2c: isn't it a bit overkill to have a fullblown structure for this at
the netif level at all? How about something like,

1) a netif iterator function:

   struct netif *
   netif_iter(struct netif *prev)
   {
     return ((prev == NULL) ? netif_list : (prev->next));
   }

   and,
2) a netif_get_name(netif, buf) function, which could share code with
netif_index_to_name() ?

Any higher layers can construct a list in whatever form they wish using those
two..

    _______________________________________________________

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]