/[lwip]/lwip/src/core/netif.c
ViewVC logotype

Diff of /lwip/src/core/netif.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by jani, Fri Feb 21 16:43:46 2003 UTC revision 1.8 by jani, Fri Mar 7 10:55:58 2003 UTC
# Line 70  netif_add(struct ip_addr *ipaddr, struct Line 70  netif_add(struct ip_addr *ipaddr, struct
70    netif->state = state;    netif->state = state;
71    netif->num = netifnum++;    netif->num = netifnum++;
72    netif->input = input;    netif->input = input;
   ip_addr_set(&(netif->ip_addr), ipaddr);  
   ip_addr_set(&(netif->netmask), netmask);  
   ip_addr_set(&(netif->gw), gw);  
73    
74      netif_set_addr(netif, ipaddr, netmask, gw);
75      
76    if (init(netif) != ERR_OK) {    if (init(netif) != ERR_OK) {
77        mem_free(netif);        mem_free(netif);
78        return NULL;        return NULL;
# Line 93  netif_add(struct ip_addr *ipaddr, struct Line 92  netif_add(struct ip_addr *ipaddr, struct
92  #endif /* NETIF_DEBUG */  #endif /* NETIF_DEBUG */
93    return netif;    return netif;
94  }  }
95    
96    void
97    netif_set_addr(struct netif *netif,struct ip_addr *ipaddr, struct ip_addr *netmask,
98              struct ip_addr *gw)
99    {
100      netif_set_ipaddr(netif, ipaddr);
101      netif_set_netmask(netif, netmask);
102      netif_set_gw(netif, gw);
103    }
104    
105  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
106  void netif_remove(struct netif * netif)  void netif_remove(struct netif * netif)
107  {  {

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26