2019-11-29 22:23:16 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2019 by John D. Robertson *
|
|
|
|
* john@rrci.com *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
***************************************************************************/
|
|
|
|
#ifndef EZ_LIBANL_H
|
|
|
|
#define EZ_LIBANL_H
|
|
|
|
|
|
|
|
/* Simplified interface to libanl functions */
|
2020-09-15 15:31:27 +00:00
|
|
|
#ifndef _GNU_SOURCE
|
|
|
|
# define _GNU_SOURCE
|
|
|
|
#endif
|
2019-11-29 22:23:16 +00:00
|
|
|
#include <netdb.h>
|
2020-09-15 15:31:27 +00:00
|
|
|
#include "ez.h"
|
2019-11-29 22:23:16 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-09-15 15:31:27 +00:00
|
|
|
ez_proto(int, getaddrinfo_a,
|
2019-11-29 22:23:16 +00:00
|
|
|
int mode,
|
|
|
|
struct gaicb *list[],
|
|
|
|
int nitems,
|
2020-09-15 15:31:27 +00:00
|
|
|
struct sigevent *sevp);
|
2019-12-06 13:44:51 +00:00
|
|
|
#ifdef DEBUG
|
2020-09-15 15:31:27 +00:00
|
|
|
# define ez_getaddrinfo_a(...) \
|
|
|
|
_ez_getaddrinfo_a(__FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
2019-12-06 13:44:51 +00:00
|
|
|
#else
|
2020-09-15 15:31:27 +00:00
|
|
|
# define ez_getaddrinfo_a(...) \
|
|
|
|
_ez_getaddrinfo_a(__VA_ARGS__)
|
2019-12-06 13:44:51 +00:00
|
|
|
#endif
|
2020-09-15 15:31:27 +00:00
|
|
|
|
|
|
|
ez_proto (int, gai_suspend,
|
2019-11-29 22:23:16 +00:00
|
|
|
const struct gaicb * const list[],
|
|
|
|
int nitems,
|
2020-09-15 15:31:27 +00:00
|
|
|
const struct timespec *timeout);
|
|
|
|
#ifdef DEBUG
|
|
|
|
# define ez_gai_suspend(...) \
|
|
|
|
_ez_gai_suspend(__FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
|
|
|
#else
|
|
|
|
# define ez_gai_suspend(...) \
|
|
|
|
_ez_gai_suspend(__VA_ARGS__)
|
|
|
|
#endif
|
2019-11-29 22:23:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|