|
Packit |
5f9837 |
/*
|
|
Packit |
5f9837 |
* resolving DNS hostname routine
|
|
Packit |
5f9837 |
*
|
|
Packit |
5f9837 |
* Copyright (C) 2010 Jeff Layton (jlayton@samba.org)
|
|
Packit |
5f9837 |
* Copyright (C) 2010 Igor Druzhinin (jaxbrigs@gmail.com)
|
|
Packit |
5f9837 |
*
|
|
Packit |
5f9837 |
* This program is free software; you can redistribute it and/or modify
|
|
Packit |
5f9837 |
* it under the terms of the GNU General Public License as published by
|
|
Packit |
5f9837 |
* the Free Software Foundation; either version 3 of the License, or
|
|
Packit |
5f9837 |
* (at your option) any later version.
|
|
Packit |
5f9837 |
*
|
|
Packit |
5f9837 |
* This program is distributed in the hope that it will be useful,
|
|
Packit |
5f9837 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
5f9837 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
5f9837 |
* GNU General Public License for more details.
|
|
Packit |
5f9837 |
*
|
|
Packit |
5f9837 |
* You should have received a copy of the GNU General Public License
|
|
Packit |
5f9837 |
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
5f9837 |
*/
|
|
Packit |
5f9837 |
|
|
Packit |
5f9837 |
#ifndef _RESOLVE_HOST_H_
|
|
Packit |
5f9837 |
#define _RESOLVE_HOST_H_
|
|
Packit |
5f9837 |
|
|
Packit |
5f9837 |
#include <arpa/inet.h>
|
|
Packit |
5f9837 |
|
|
Packit |
5f9837 |
/* currently maximum length of IPv6 address string */
|
|
Packit |
5f9837 |
#define MAX_ADDRESS_LEN INET6_ADDRSTRLEN
|
|
Packit |
5f9837 |
|
|
Packit |
5f9837 |
/* limit list of addresses to 16 max-size addrs */
|
|
Packit |
5f9837 |
#define MAX_ADDR_LIST_LEN ((MAX_ADDRESS_LEN + 1) * 16)
|
|
Packit |
5f9837 |
|
|
Packit |
5f9837 |
extern int resolve_host(const char *host, char *addrstr);
|
|
Packit |
5f9837 |
|
|
Packit |
5f9837 |
#endif /* _RESOLVE_HOST_H_ */
|