|
From: | Leon Woestenberg |
Subject: | Re: [lwip-users] lwip 1.1.0: missing ipv4 ip_addr_netcmp()? |
Date: | Thu, 06 Jan 2005 00:34:36 +0100 |
User-agent: | Mozilla Thunderbird 0.7.1 (Windows/20040626) |
Hello Christ, Chris Frost wrote:
_netcmp() previously was called _maskcmp(). As we are comparing networks (and not their masks) this function was renamed. It is implemented as a macro in this header file: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?
include/ipv4/lwip/ip_addr.h: /** * Determine if two address are on the same network. * * @arg addr1 IP address 1 * @arg addr2 IP address 2 * @arg mask network identifier mask * @return !0 if the network identifiers of both address match */ #define ip_addr_netcmp(addr1, addr2, mask) (((addr1)->addr & \ (mask)->addr) == \ ((addr2)->addr & \ (mask)->addr)) So simply include this file and you should be OK. Regards, Leon.
[Prev in Thread] | Current Thread | [Next in Thread] |