t_sockaddr.c revision c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840e
/*
* Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: t_sockaddr.c,v 1.14 2007/06/19 23:47:00 tbox Exp $ */
#include <config.h>
#include <isc/sockaddr.h>
static int
test_isc_sockaddr_eqaddrprefix(void) {
return T_FAIL;
return T_FAIL;
return T_FAIL;
return T_FAIL;
return T_FAIL;
return T_FAIL;
return T_FAIL;
return T_FAIL;
return T_FAIL;
return T_PASS;
}
static void
t1(void) {
int result;
"isc_sockaddr_eqaddrprefix() returns ISC_TRUE when "
"prefixes of a and b are equal, and ISC_FALSE when "
"they are not equal");
}
static int
test_isc_netaddr_masktoprefixlen(void) {
unsigned int plen;
return T_FAIL;
return T_FAIL;
return T_FAIL;
return T_FAIL;
return T_FAIL;
if (plen != 0)
return T_FAIL;
return T_FAIL;
if (plen != 31)
return T_FAIL;
return T_FAIL;
if (plen != 32)
return T_FAIL;
return T_FAIL;
if (plen != 24)
return T_FAIL;
return T_PASS;
}
static void
t2(void) {
int result;
"isc_netaddr_masktoprefixlen() calculates "
"correct prefix lengths ");
}
testspec_t T_testlist[] = {
};
#ifdef WIN32
int
}
#endif