lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #7269] Call netif_set_default during netif_add if not


From: Frédéric Bernon
Subject: [lwip-devel] [task #7269] Call netif_set_default during netif_add if not yet defined
Date: Mon, 03 Sep 2007 10:06:22 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

URL:
  <http://savannah.nongnu.org/task/?7269>

                 Summary: Call netif_set_default during netif_add if not yet
defined
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: fbernon
            Submitted on: lundi 03.09.2007 à 12:06
                Category: None
         Should Start On: lundi 03.09.2007 à 00:00
   Should be Finished on: lundi 03.09.2007 à 00:00
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
                  Effort: 0.00

    _______________________________________________________

Details:

Is there any objections to patch netif_add like this ?

Index: netif.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/netif.c,v
retrieving revision 1.59
diff -u -0 -p -r1.59 netif.c
--- netif.c     29 Aug 2007 21:12:33 -0000      1.59
+++ netif.c     3 Sep 2007 10:04:22 -0000
@@ -138,0 +139,6 @@ netif_add(struct netif *netif, struct ip
+  /* if netif_default if not yet defined */
+  if (netif_default == NULL) {
+    /* set this one as netif_default */
+    netif_set_default(netif);
+  }
+
@@ -205 +211 @@ void netif_remove(struct netif * netif)
-    netif_default = NULL;
+    netif_set_default(NULL);

I'm looking rawapi.txt to update the "--- System initalization" part, and I
think it can help new users.

Note that the patch in netif_remove is mandatory (some processing are done in
netif_set_default with NULL parameter).





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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