2
* solve.h - header for solve.c, addresses family-independant resolution
4
* $Id: solve.h,v 1.5 2003/01/26 09:09:08 rdenisc Exp $
7
/***********************************************************************
8
* Copyright (C) 2002-2003 R�mi Denis-Courmont. *
9
* This program is free software; you can redistribute and/or modify *
10
* it under the terms of the GNU General Public License as published *
11
* by the Free Software Foundation; version 2 of the license. *
13
* This program is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
16
* See the GNU General Public License for more details. *
18
* You should have received a copy of the GNU General Pulic License *
19
* along with this program; if not, you can get it from: *
20
* http://www.gnu.org/copyleft/gpl.html *
21
***********************************************************************/
23
#ifndef __TCPREEN_SOLVE_H
25
# define __TCPREEN_SOLVE_H
26
# include <stddef.h> /* size_t */
27
# ifdef HAVE_SYS_TYPES_H
28
# include <sys/types.h> /* might be needed for sys/socket.h */
30
# ifdef HAVE_SYS_SOCKET_H
31
# include <sys/socket.h> /* might be needed for struct sockaddr */
33
# include "getaddrinfo.h" /* NI_MAXHOST, NI_MAXSERV */
39
#define NI_MAXADDRESS NI_MAXHOST + NI_MAXSERV + 2
41
int secure_getnameinfo(struct sockaddr *addr, size_t addrlen,
42
char *nodename, size_t nlen, char *service, size_t slen, int flags);
43
int getsockaddr(int fd, int flags, int peer, char *buf, size_t len);