155714Skris/* 255714Skris * Copyright (c) 1999 Kungliga Tekniska H�gskolan 355714Skris * (Royal Institute of Technology, Stockholm, Sweden). 455714Skris * All rights reserved. 555714Skris * 655714Skris * Redistribution and use in source and binary forms, with or without 755714Skris * modification, are permitted provided that the following conditions 8280304Sjkim * are met: 955714Skris * 1055714Skris * 1. Redistributions of source code must retain the above copyright 1155714Skris * notice, this list of conditions and the following disclaimer. 1255714Skris * 1355714Skris * 2. Redistributions in binary form must reproduce the above copyright 1455714Skris * notice, this list of conditions and the following disclaimer in the 15280304Sjkim * documentation and/or other materials provided with the distribution. 1655714Skris * 1755714Skris * 3. All advertising materials mentioning features or use of this software 1855714Skris * must display the following acknowledgement: 1955714Skris * This product includes software developed by the Kungliga Tekniska 2055714Skris * H�gskolan and its contributors. 2155714Skris * 22280304Sjkim * 4. Neither the name of the Institute nor the names of its contributors 2355714Skris * may be used to endorse or promote products derived from this software 2455714Skris * without specific prior written permission. 2555714Skris * 2655714Skris * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 2755714Skris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2855714Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2955714Skris * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 3055714Skris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3155714Skris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3255714Skris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3355714Skris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3455714Skris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3555714Skris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3655714Skris * SUCH DAMAGE. 37280304Sjkim */ 3855714Skris 3955714Skris/* Id: inet_pton.c,v 1.6 2003-11-16 09:36:51 guy Exp */ 40280304Sjkim 4155714Skris#ifndef lint 4255714Skrisstatic const char rcsid[] _U_ = 4355714Skris "@(#) Header: /tcpdump/master/tcpdump/missing/inet_pton.c,v 1.6 2003-11-16 09:36:51 guy Exp"; 4455714Skris#endif 4555714Skris 4655714Skris#include <tcpdump-stdinc.h> 4755714Skris 4855714Skris#include <errno.h> 4955714Skris 5055714Skrisint 5155714Skrisinet_pton(int af, const char *src, void *dst) 52280304Sjkim{ 5355714Skris if (af != AF_INET) { 5455714Skris errno = EAFNOSUPPORT; 5555714Skris return -1; 5655714Skris } 5755714Skris return inet_aton (src, dst); 5855714Skris} 59280304Sjkim