2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-03 16:15:27 +00:00

u_int32_t -> isc_uin32_t

This commit is contained in:
Mark Andrews
2002-10-28 02:23:54 +00:00
parent a3bcfd4660
commit e12b02b62c
3 changed files with 10 additions and 10 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: netscope.h,v 1.2 2002/10/24 03:52:34 marka Exp $ */
/* $Id: netscope.h,v 1.3 2002/10/28 02:23:54 marka Exp $ */
#ifndef ISC_NETSCOPE_H
#define ISC_NETSCOPE_H 1
@@ -33,7 +33,7 @@ ISC_LANG_BEGINDECLS
* ISC_R_FAILURE: conversion fails
*/
isc_result_t
isc_netscope_pton(int af, char *scopename, char *addr, u_int32_t *zoneid);
isc_netscope_pton(int af, char *scopename, char *addr, isc_uint32_t *zoneid);
ISC_LANG_ENDDECLS

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: netaddr.c,v 1.24 2002/10/25 02:36:42 marka Exp $ */
/* $Id: netaddr.c,v 1.25 2002/10/28 02:23:53 marka Exp $ */
#include <config.h>
@@ -245,14 +245,14 @@ isc_netaddr_fromin6(isc_netaddr_t *netaddr, const struct in6_addr *ina6) {
}
void
isc_netaddr_setzone(isc_netaddr_t *netaddr, u_int32_t zone) {
isc_netaddr_setzone(isc_netaddr_t *netaddr, isc_uint32_t zone) {
/* we currently only support AF_INET6. */
REQUIRE(netaddr->family == AF_INET6);
netaddr->zone = zone;
}
u_int32_t
isc_uint32_t
isc_netaddr_getzone(const isc_netaddr_t *netaddr) {
return (netaddr->zone);
}

View File

@@ -17,7 +17,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] =
"$Id: netscope.c,v 1.2 2002/10/24 03:52:33 marka Exp $";
"$Id: netscope.c,v 1.3 2002/10/28 02:23:53 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <isc/string.h>
@@ -26,11 +26,11 @@ static char rcsid[] =
#include <isc/result.h>
isc_result_t
isc_netscope_pton(int af, char *scopename, char *addr, u_int32_t *zoneid) {
isc_netscope_pton(int af, char *scopename, char *addr, isc_uint32_t *zoneid) {
char *ep;
unsigned int ifid;
struct in6_addr *in6;
u_int32_t zone;
isc_uint32_t zone;
isc_uint64_t llz;
/* at this moment, we only support AF_INET6 */
@@ -49,14 +49,14 @@ isc_netscope_pton(int af, char *scopename, char *addr, u_int32_t *zoneid) {
*/
if (IN6_IS_ADDR_LINKLOCAL(in6) &&
(ifid = if_nametoindex((const char *)scopename)) != 0)
zone = (u_int32_t)ifid;
zone = (isc_uint32_t)ifid;
else {
llz = isc_string_touint64(scopename, &ep, 10);
if (ep == scopename)
return (ISC_R_FAILURE);
/* check overflow */
zone = (u_int32_t)(llz & 0xffffffffUL);
zone = (isc_uint32_t)(llz & 0xffffffffUL);
if (zone != llz)
return (ISC_R_FAILURE);
}