/[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.18 by likewise, Wed Apr 9 15:17:57 2003 UTC revision 1.19 by likewise, Fri Apr 11 14:02:48 2003 UTC
# Line 211  netif_set_ipaddr(struct netif *netif, st Line 211  netif_set_ipaddr(struct netif *netif, st
211    }    }
212  #endif  #endif
213    ip_addr_set(&(netif->ip_addr), ipaddr);    ip_addr_set(&(netif->ip_addr), ipaddr);
214    DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: new IP address of interface %c%c%u is %u.%u.%u.%u\n",    DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: IP address of interface %c%c set to %u.%u.%u.%u\n",
215      netif->name[0], netif->name[1], netif->num,                         netif->name[0], netif->name[1],
216      (u8_t)(ntohl(netif->ip_addr.addr) >> 24 & 0xff),      (u8_t)(ntohl(netif->ip_addr.addr) >> 24 & 0xff),
217      (u8_t)(ntohl(netif->ip_addr.addr) >> 16 & 0xff),      (u8_t)(ntohl(netif->ip_addr.addr) >> 16 & 0xff),
218      (u8_t)(ntohl(netif->ip_addr.addr) >> 8 & 0xff),      (u8_t)(ntohl(netif->ip_addr.addr) >> 8 & 0xff),
# Line 222  netif_set_ipaddr(struct netif *netif, st Line 222  netif_set_ipaddr(struct netif *netif, st
222  void  void
223  netif_set_gw(struct netif *netif, struct ip_addr *gw)  netif_set_gw(struct netif *netif, struct ip_addr *gw)
224  {  {
   DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: setting GW address of interface %c%c%u to %u.%u.%u.%u\n",  
                        netif->name[0], netif->name[1], netif->num,  
                        (u8_t)(ntohl(gw->addr) >> 24 & 0xff),  
                        (u8_t)(ntohl(gw->addr) >> 16 & 0xff),  
                        (u8_t)(ntohl(gw->addr) >> 8 & 0xff),  
                        (u8_t)(ntohl(gw->addr) & 0xff)));  
225    ip_addr_set(&(netif->gw), gw);    ip_addr_set(&(netif->gw), gw);
226      DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: GW address of interface %c%c set to %u.%u.%u.%u\n",
227                           netif->name[0], netif->name[1],
228                           (u8_t)(ntohl(netif->gw.addr) >> 24 & 0xff),
229                           (u8_t)(ntohl(netif->gw.addr) >> 16 & 0xff),
230                           (u8_t)(ntohl(netif->gw.addr) >> 8 & 0xff),
231                           (u8_t)(ntohl(netif->gw.addr) & 0xff)));
232  }  }
233  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
234  void  void
235  netif_set_netmask(struct netif *netif, struct ip_addr *netmask)  netif_set_netmask(struct netif *netif, struct ip_addr *netmask)
236  {  {
   DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: setting netmask of interface %c%c%u to %u.%u.%u.%u\n",  
                        netif->name[0], netif->name[1], netif->num,  
                        (u8_t)(ntohl(netmask->addr) >> 24 & 0xff),  
                        (u8_t)(ntohl(netmask->addr) >> 16 & 0xff),  
                        (u8_t)(ntohl(netmask->addr) >> 8 & 0xff),  
                        (u8_t)(ntohl(netmask->addr) & 0xff)));  
237    ip_addr_set(&(netif->netmask), netmask);    ip_addr_set(&(netif->netmask), netmask);
238      DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE | 3, ("netif: netmask of interface %c%c set to %u.%u.%u.%u\n",
239                           netif->name[0], netif->name[1],
240                           (u8_t)(ntohl(netif->netmask.addr) >> 24 & 0xff),
241                           (u8_t)(ntohl(netif->netmask.addr) >> 16 & 0xff),
242                           (u8_t)(ntohl(netif->netmask.addr) >> 8 & 0xff),
243                           (u8_t)(ntohl(netif->netmask.addr) & 0xff)));
244  }  }
245  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
246  void  void

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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