Blame nscd/gethstbyad_r.c

Packit Service 82fcde
/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
Packit Service 82fcde
Packit Service 82fcde
   This program is free software; you can redistribute it and/or modify
Packit Service 82fcde
   it under the terms of the GNU General Public License as published
Packit Service 82fcde
   by the Free Software Foundation; version 2 of the License, or
Packit Service 82fcde
   (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   This program is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 82fcde
   GNU General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU General Public License
Packit Service 82fcde
   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
#include <netdb.h>
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
#define LOOKUP_TYPE	struct hostent
Packit Service 82fcde
#define FUNCTION_NAME	gethostbyaddr2
Packit Service 82fcde
#define FUNCTION2_NAME	gethostbyaddr
Packit Service 82fcde
#define DATABASE_NAME	hosts
Packit Service 82fcde
#define ADD_PARAMS	const void *addr, socklen_t len, int type
Packit Service 82fcde
#define EXTRA_PARAMS	, int32_t *ttlp
Packit Service 82fcde
#define ADD_VARIABLES	addr, len, type
Packit Service 82fcde
#define EXTRA_VARIABLES , ttlp
Packit Service 82fcde
#define NEED_H_ERRNO	1
Packit Service 82fcde
#define NEED__RES	1
Packit Service 82fcde
Packit Service 82fcde
/* We are nscd, so we don't want to be talking to ourselves.  */
Packit Service 82fcde
#undef	USE_NSCD
Packit Service 82fcde
Packit Service 82fcde
#include "../nss/getXXbyYY_r.c"
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
int
Packit Service 82fcde
__gethostbyaddr_r (const void *addr, socklen_t len, int type,
Packit Service 82fcde
		   struct hostent *result_buf, char *buf, size_t buflen,
Packit Service 82fcde
		   struct hostent **result, int *h_errnop)
Packit Service 82fcde
{
Packit Service 82fcde
  return __gethostbyaddr2_r (addr, len, type, result_buf, buf, buflen,
Packit Service 82fcde
			     result, h_errnop, NULL);
Packit Service 82fcde
}