/[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.27 by kieranm, Tue Jun 10 10:45:29 2003 UTC revision 1.28 by likewise, Wed Jun 11 22:11:42 2003 UTC
# Line 100  netif_add(struct ip_addr *ipaddr, struct Line 100  netif_add(struct ip_addr *ipaddr, struct
100  #if NETIF_DEBUG  #if NETIF_DEBUG
101    LWIP_DEBUGF(NETIF_DEBUG, ("netif: added interface %c%c IP addr ",    LWIP_DEBUGF(NETIF_DEBUG, ("netif: added interface %c%c IP addr ",
102      netif->name[0], netif->name[1]));      netif->name[0], netif->name[1]));
103    ip_addr_debug_print(ipaddr);    ip_addr_debug_print(NETIF_DEBUG, ipaddr);
104    LWIP_DEBUGF(NETIF_DEBUG, (" netmask "));    LWIP_DEBUGF(NETIF_DEBUG, (" netmask "));
105    ip_addr_debug_print(netmask);    ip_addr_debug_print(NETIF_DEBUG, netmask);
106    LWIP_DEBUGF(NETIF_DEBUG, (" gw "));      LWIP_DEBUGF(NETIF_DEBUG, (" gw "));
107    ip_addr_debug_print(gw);    ip_addr_debug_print(NETIF_DEBUG, gw);
108    LWIP_DEBUGF(NETIF_DEBUG, ("\n"));    LWIP_DEBUGF(NETIF_DEBUG, ("\n"));
109  #endif /* NETIF_DEBUG */  #endif /* NETIF_DEBUG */
110    return netif;    return netif;
# Line 211  netif_set_ipaddr(struct netif *netif, st Line 211  netif_set_ipaddr(struct netif *netif, st
211  #endif  #endif
212    ip_addr_set(&(netif->ip_addr), ipaddr);    ip_addr_set(&(netif->ip_addr), ipaddr);
213    LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: IP address of interface %c%c set to %u.%u.%u.%u\n",    LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: IP address of interface %c%c set to %u.%u.%u.%u\n",
214      netif->name[0], netif->name[1],      netif->name[0], netif->name[1],
215      (u8_t)(ntohl(netif->ip_addr.addr) >> 24 & 0xff),      (unsigned int)(ntohl(netif->ip_addr.addr) >> 24 & 0xff),
216      (u8_t)(ntohl(netif->ip_addr.addr) >> 16 & 0xff),      (unsigned int)(ntohl(netif->ip_addr.addr) >> 16 & 0xff),
217      (u8_t)(ntohl(netif->ip_addr.addr) >> 8 & 0xff),      (unsigned int)(ntohl(netif->ip_addr.addr) >> 8 & 0xff),
218      (u8_t)(ntohl(netif->ip_addr.addr) & 0xff)));      (unsigned int)(ntohl(netif->ip_addr.addr) & 0xff)));
219  }  }
220  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
221  void  void
# Line 224  netif_set_gw(struct netif *netif, struct Line 224  netif_set_gw(struct netif *netif, struct
224    ip_addr_set(&(netif->gw), gw);    ip_addr_set(&(netif->gw), gw);
225    LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: GW address of interface %c%c set to %u.%u.%u.%u\n",    LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: GW address of interface %c%c set to %u.%u.%u.%u\n",
226             netif->name[0], netif->name[1],             netif->name[0], netif->name[1],
227             (u8_t)(ntohl(netif->gw.addr) >> 24 & 0xff),             (unsigned int)(ntohl(netif->gw.addr) >> 24 & 0xff),
228             (u8_t)(ntohl(netif->gw.addr) >> 16 & 0xff),             (unsigned int)(ntohl(netif->gw.addr) >> 16 & 0xff),
229             (u8_t)(ntohl(netif->gw.addr) >> 8 & 0xff),             (unsigned int)(ntohl(netif->gw.addr) >> 8 & 0xff),
230             (u8_t)(ntohl(netif->gw.addr) & 0xff)));             (unsigned int)(ntohl(netif->gw.addr) & 0xff)));
231  }  }
232  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
233  void  void
# Line 236  netif_set_netmask(struct netif *netif, s Line 236  netif_set_netmask(struct netif *netif, s
236    ip_addr_set(&(netif->netmask), netmask);    ip_addr_set(&(netif->netmask), netmask);
237    LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: netmask of interface %c%c set to %u.%u.%u.%u\n",    LWIP_DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: netmask of interface %c%c set to %u.%u.%u.%u\n",
238             netif->name[0], netif->name[1],             netif->name[0], netif->name[1],
239             (u8_t)(ntohl(netif->netmask.addr) >> 24 & 0xff),             (unsigned int)(ntohl(netif->netmask.addr) >> 24 & 0xff),
240             (u8_t)(ntohl(netif->netmask.addr) >> 16 & 0xff),             (unsigned int)(ntohl(netif->netmask.addr) >> 16 & 0xff),
241             (u8_t)(ntohl(netif->netmask.addr) >> 8 & 0xff),             (unsigned int)(ntohl(netif->netmask.addr) >> 8 & 0xff),
242             (u8_t)(ntohl(netif->netmask.addr) & 0xff)));             (unsigned int)(ntohl(netif->netmask.addr) & 0xff)));
243  }  }
244  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
245  void  void

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

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