lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Hardware - level for netif_remove()


From: address@hidden
Subject: Re: [lwip-users] Hardware - level for netif_remove()
Date: Sat, 08 May 2010 10:30:47 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

Bill Auerbach wrote:
Perhaps the function passed to netif_add could take a 2nd argument.  Use
this in netif_add:

   /* call user specified initialization function for netif */
   if (init(netif,1) != ERR_OK) {
     return NULL;
   }

And this in netif_remove:

   /* call user specified initialization function for netif */
   if (init(netif,0) != ERR_OK) {
     return NULL;
   }
The problem is that we would have to pass a parameter to netif_remove, since the init function is not known at that time (not saved in struct netif). Being like that, we could also add another function for low_level_remove() instead of re-using the init function. The question is whether many people need it because it adds to the code size...
Impact on existing ports is minimal.
The main impact would be that we would have to add a new parameter to netif_remove().

Simon




reply via email to

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