/[lwip]/lwip/src/core/ipv4/ip_addr.c
ViewVC logotype

Diff of /lwip/src/core/ipv4/ip_addr.c

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

revision 1.18 by likewise, Thu Nov 25 13:33:07 2004 UTC revision 1.19 by likewise, Thu Nov 25 13:57:05 2004 UTC
# Line 60  u8_t ip_addr_isbroadcast(struct ip_addr Line 60  u8_t ip_addr_isbroadcast(struct ip_addr
60    /* address matches network interface address exactly? => no broadcast */    /* address matches network interface address exactly? => no broadcast */
61    else if (addr->addr == netif->ip_addr.addr)    else if (addr->addr == netif->ip_addr.addr)
62      return 0;      return 0;
63    /*  on the same (sub) network and    /*  on the same (sub) network... */
    *  host identifier bits are all ones? => network broadcast address */  
64    else if (ip_addr_netcmp(addr->addr, netif->ip_addr.addr, netif->netmask.addr))    else if (ip_addr_netcmp(addr->addr, netif->ip_addr.addr, netif->netmask.addr))
65             /* ...and host identifier bits are all ones? =>... */
66            && ((addr->addr & ~netif->netmask.addr) ==            && ((addr->addr & ~netif->netmask.addr) ==
67             (ip_addr_broadcast.addr & ~netif->netmask.addr))             (ip_addr_broadcast.addr & ~netif->netmask.addr))
68        /* => network broadcast address */
69      return 1;      return 1;
70    else    else
71      return 0;      return 0;

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