lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] lwip 1.1.0: missing ipv4 ip_addr_netcmp()?


From: Chris Frost
Subject: [lwip-users] lwip 1.1.0: missing ipv4 ip_addr_netcmp()?
Date: Wed, 5 Jan 2005 10:03:50 -0800
User-agent: Mutt/1.3.28i

I just upgraded from lwip 1.0.0 to 1.1.0 and it seems there is code using
ip_addr_netcmp(). Specifically, ipv4/ip_addr.c:75, ipv4/ip.c:88,
netif/etharp.c:439, and netif/etharp.c:626 I've noticed.

I see ipv6's declaration of this function, but haven't been able to find any
other declarations. Am I missing something?


In either case, I added an ip_addr_netcmp() based on ipv6's to ipv4/ip_addr.c:

int
ip_addr_netcmp(struct ip_addr *addr1, struct ip_addr *addr2,
                struct ip_addr *mask)
{
  return((addr1->addr & mask->addr) == (addr2->addr & mask->addr));
}

I didn't see any comments on what the function is supposed to do, but this
seems correct after reading ipv6's and is working for me.

-- 
Chris Frost  |  <http://www.frostnet.net/chris/>
-------------+----------------------------------
Public PGP Key:
   Email address@hidden with the subject "retrieve pgp key"
   or visit <http://www.frostnet.net/chris/about/pgp_key.phtml>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]