Blame lib/replace/inet_aton.c

rpm-build 95f51c
/*
rpm-build 95f51c
 * Unix SMB/CIFS implementation.
rpm-build 95f51c
 * replacement functions
rpm-build 95f51c
 * Copyright (C) Michael Adam <obnox@samba.org> 2008
rpm-build 95f51c
 *
rpm-build 95f51c
 *  ** NOTE! The following LGPL license applies to the replace
rpm-build 95f51c
 *  ** library. This does NOT imply that all of Samba is released
rpm-build 95f51c
 *  ** under the LGPL
rpm-build 95f51c
 *
rpm-build 95f51c
 * This library is free software; you can redistribute it and/or
rpm-build 95f51c
 * modify it under the terms of the GNU Lesser General Public
rpm-build 95f51c
 * License as published by the Free Software Foundation; either
rpm-build 95f51c
 * version 3 of the License, or (at your option) any later version.
rpm-build 95f51c
 *
rpm-build 95f51c
 * This library is distributed in the hope that it will be useful,
rpm-build 95f51c
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 95f51c
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
rpm-build 95f51c
 * Lesser General Public License for more details.
rpm-build 95f51c
 *
rpm-build 95f51c
 * You should have received a copy of the GNU Lesser General Public
rpm-build 95f51c
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
rpm-build 95f51c
 */
rpm-build 95f51c
rpm-build 95f51c
#include "replace.h"
rpm-build 95f51c
#include "system/network.h"
rpm-build 95f51c
rpm-build 95f51c
/**
rpm-build 95f51c
 * We know that we have inet_pton from earlier libreplace checks.
rpm-build 95f51c
 */
rpm-build 95f51c
int rep_inet_aton(const char *src, struct in_addr *dst)
rpm-build 95f51c
{
rpm-build 95f51c
	return (inet_pton(AF_INET, src, dst) > 0) ? 1 : 0;
rpm-build 95f51c
}