/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*
* files/gethostent6.c -- "files" backend for nsswitch "hosts" database
*/
#include <netdb.h>
#include "files_common.h"
#include <string.h>
#include <strings.h>
#include <stddef.h>
#include <stdlib.h>
#include <ctype.h>
#include <nss.h>
extern nss_status_t __nss_files_XY_hostbyname();
extern int __nss_files_check_addr(int, nss_XbyY_args_t *, const char *, int);
extern int check_name_host(nss_XbyY_args_t *, const char *, int,
int, const char **, int *, void *, int *);
static uint_t
int linelen)
{
int h_length;
char *h_addrp;
if (keyhash) {
sizeof (addr_ipv6));
} else {
&h_length) == 0)
return (0);
}
/* Take 4 bytes which are shared between IPv4 and IPv6. */
return (hash);
}
/*
* hash_ipnodes functions are used for single-value attribute
* hash_arr_ipnodes are used for multi-value attribute (line in local file
* where hostnames can be canonical + aliases)
*/
sizeof (struct hostent),
2,
};
static int
{
const char *namep;
int namelen;
int i;
&addr_ipv6, &i));
}
static nss_status_t
{
/*
* For systems without nscd and for libnsl API there is non-hash
* function with different output buffer.
*/
AF_INET6);
else
if (res != NSS_SUCCESS)
return (res);
}
static int
{
}
static nss_status_t
{
if (res != NSS_SUCCESS)
return (res);
}
};
/*ARGSUSED*/
{
return (_nss_files_constr(ipnodes_ops,
sizeof (ipnodes_ops) / sizeof (ipnodes_ops[0]),
}