/[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.5 by jani, Tue Feb 11 09:51:22 2003 UTC revision 1.6 by jani, Thu Feb 20 11:51:53 2003 UTC
# Line 55  struct netif * Line 55  struct netif *
55  netif_add(struct ip_addr *ipaddr, struct ip_addr *netmask,  netif_add(struct ip_addr *ipaddr, struct ip_addr *netmask,
56            struct ip_addr *gw,            struct ip_addr *gw,
57            void *state,            void *state,
58            void (* init)(struct netif *netif),            err_t (* init)(struct netif *netif),
59            err_t (* input)(struct pbuf *p, struct netif *netif))            err_t (* input)(struct pbuf *p, struct netif *netif))
60  {  {
61    struct netif *netif;    struct netif *netif;
# Line 74  netif_add(struct ip_addr *ipaddr, struct Line 74  netif_add(struct ip_addr *ipaddr, struct
74    ip_addr_set(&(netif->netmask), netmask);    ip_addr_set(&(netif->netmask), netmask);
75    ip_addr_set(&(netif->gw), gw);    ip_addr_set(&(netif->gw), gw);
76    
77    init(netif);    if (init(netif) != ERR_OK) {
78            mem_free(netif);
79          return NULL;
80      }
81    
82    netif->next = netif_list;    netif->next = netif_list;
83    netif_list = netif;    netif_list = netif;
84  #if NETIF_DEBUG  #if NETIF_DEBUG

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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