/[lwip]/lwip/src/core/ipv6/ip6_addr.c
ViewVC logotype

Diff of /lwip/src/core/ipv6/ip6_addr.c

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

revision 1.5 by likewise, Thu May 1 13:24:01 2003 UTC revision 1.5.4.1 by likewise, Fri Nov 14 09:42:51 2003 UTC
# Line 33  Line 33 
33  #include "lwip/ip_addr.h"  #include "lwip/ip_addr.h"
34  #include "lwip/inet.h"  #include "lwip/inet.h"
35    
36  /*-----------------------------------------------------------------------------------*/  
37  int  int
38  ip_addr_maskcmp(struct ip_addr *addr1, struct ip_addr *addr2,  ip_addr_maskcmp(struct ip_addr *addr1, struct ip_addr *addr2,
39                  struct ip_addr *mask)                  struct ip_addr *mask)
# Line 44  ip_addr_maskcmp(struct ip_addr *addr1, s Line 44  ip_addr_maskcmp(struct ip_addr *addr1, s
44           (addr1->addr[3] & mask->addr[3]) == (addr2->addr[3] & mask->addr[3]));           (addr1->addr[3] & mask->addr[3]) == (addr2->addr[3] & mask->addr[3]));
45                    
46  }  }
47  /*-----------------------------------------------------------------------------------*/  
48  int  int
49  ip_addr_cmp(struct ip_addr *addr1, struct ip_addr *addr2)  ip_addr_cmp(struct ip_addr *addr1, struct ip_addr *addr2)
50  {  {
# Line 53  ip_addr_cmp(struct ip_addr *addr1, struc Line 53  ip_addr_cmp(struct ip_addr *addr1, struc
53           addr1->addr[2] == addr2->addr[2] &&           addr1->addr[2] == addr2->addr[2] &&
54           addr1->addr[3] == addr2->addr[3]);           addr1->addr[3] == addr2->addr[3]);
55  }  }
56  /*-----------------------------------------------------------------------------------*/  
57  void  void
58  ip_addr_set(struct ip_addr *dest, struct ip_addr *src)  ip_addr_set(struct ip_addr *dest, struct ip_addr *src)
59  {  {
# Line 63  ip_addr_set(struct ip_addr *dest, struct Line 63  ip_addr_set(struct ip_addr *dest, struct
63    dest->addr[2] = src->addr[2];    dest->addr[2] = src->addr[2];
64    dest->addr[3] = src->addr[3];*/    dest->addr[3] = src->addr[3];*/
65  }  }
66  /*-----------------------------------------------------------------------------------*/  
67  int  int
68  ip_addr_isany(struct ip_addr *addr)  ip_addr_isany(struct ip_addr *addr)
69  {  {
# Line 71  ip_addr_isany(struct ip_addr *addr) Line 71  ip_addr_isany(struct ip_addr *addr)
71    return((addr->addr[0] | addr->addr[1] | addr->addr[2] | addr->addr[3]) == 0);    return((addr->addr[0] | addr->addr[1] | addr->addr[2] | addr->addr[3]) == 0);
72  }  }
73    
74  /*-----------------------------------------------------------------------------------*/  
75  /*#if IP_DEBUG*/  /*#if IP_DEBUG*/
76  void  void
77  ip_addr_debug_print(struct ip_addr *addr)  ip_addr_debug_print(struct ip_addr *addr)
# Line 87  ip_addr_debug_print(struct ip_addr *addr Line 87  ip_addr_debug_print(struct ip_addr *addr
87           ntohl(addr->addr[3]) & 0xffff);           ntohl(addr->addr[3]) & 0xffff);
88  }  }
89  /*#endif*/ /* IP_DEBUG */  /*#endif*/ /* IP_DEBUG */
90  /*-----------------------------------------------------------------------------------*/  

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

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