/[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.13 by likewise, Mon Mar 31 10:32:35 2003 UTC revision 1.14 by likewise, Tue Apr 1 14:02:50 2003 UTC
# Line 176  void Line 176  void
176  netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr)  netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr)
177  {  {
178    ip_addr_set(&(netif->ip_addr), ipaddr);    ip_addr_set(&(netif->ip_addr), ipaddr);
179    DEBUGF(NETIF_DEBUG, ("netif: setting IP address of interface %c%c to %d.%d.%d.%d\n",    DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: setting IP address of interface %c%c%u to %u.%u.%u.%u\n",
180                         netif->name[0], netif->name[1],                         netif->name[0], netif->name[1], netif->num,
181                         (u8_t)(ntohl(ipaddr->addr) >> 24 & 0xff),                         (u8_t)(ntohl(ipaddr->addr) >> 24 & 0xff),
182                         (u8_t)(ntohl(ipaddr->addr) >> 16 & 0xff),                         (u8_t)(ntohl(ipaddr->addr) >> 16 & 0xff),
183                         (u8_t)(ntohl(ipaddr->addr) >> 8 & 0xff),                         (u8_t)(ntohl(ipaddr->addr) >> 8 & 0xff),
# Line 188  void Line 188  void
188  netif_set_gw(struct netif *netif, struct ip_addr *gw)  netif_set_gw(struct netif *netif, struct ip_addr *gw)
189  {  {
190    ip_addr_set(&(netif->gw), gw);    ip_addr_set(&(netif->gw), gw);
191      DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: setting GW address of interface %c%c%u to %u.%u.%u.%u\n",
192                           netif->name[0], netif->name[1], netif->num,
193                           (u8_t)(ntohl(gw->addr) >> 24 & 0xff),
194                           (u8_t)(ntohl(gw->addr) >> 16 & 0xff),
195                           (u8_t)(ntohl(gw->addr) >> 8 & 0xff),
196                           (u8_t)(ntohl(gw->addr) & 0xff)));
197  }  }
198  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
199  void  void
200  netif_set_netmask(struct netif *netif, struct ip_addr *netmask)  netif_set_netmask(struct netif *netif, struct ip_addr *netmask)
201  {  {
202    ip_addr_set(&(netif->netmask), netmask);    ip_addr_set(&(netif->netmask), netmask);
203      DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: setting netmask of interface %c%c%u to %u.%u.%u.%u\n",
204                           netif->name[0], netif->name[1], netif->num,
205                           (u8_t)(ntohl(netmask->addr) >> 24 & 0xff),
206                           (u8_t)(ntohl(netmask->addr) >> 16 & 0xff),
207                           (u8_t)(ntohl(netmask->addr) >> 8 & 0xff),
208                           (u8_t)(ntohl(netmask->addr) & 0xff)));
209  }  }
210  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
211  void  void

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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