]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
Added source comments.
authorlikewise <likewise>
Thu, 13 Mar 2003 08:50:04 +0000 (08:50 +0000)
committerlikewise <likewise>
Thu, 13 Mar 2003 08:50:04 +0000 (08:50 +0000)
src/core/netif.c

index 1a43ddb755f77b55cba5e70a3a3ecad632a5892c..8712cef79124a1f8487c4b2b7f1a85433c9a63e7 100644 (file)
@@ -60,24 +60,29 @@ netif_add(struct ip_addr *ipaddr, struct ip_addr *netmask,
 {
   struct netif *netif;
   static int netifnum = 0;
-  
+
+  /* allocate netif structure */  
   netif = mem_malloc(sizeof(struct netif));
 
   if(netif == NULL) {
+    DEBUGF(NETIF_DEBUG, ("netif_add(): out of memory for netif\n"));
     return NULL;
   }
   
+  /* remember netif specific state information data */
   netif->state = state;
   netif->num = netifnum++;
   netif->input = input;
 
   netif_set_addr(netif, ipaddr, netmask, gw);
   
+  /* call user specified initialization function for netif */
   if (init(netif) != ERR_OK) {
       mem_free(netif);
       return NULL;
   }
  
+  /* add this netif to the list */
   netif->next = netif_list;
   netif_list = netif;
 #if NETIF_DEBUG