Blame resolve_host.h

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