inet.h revision 21056
11539Srgrimes/*
21539Srgrimes * Copyright (c) 1983, 1993
31539Srgrimes *	The Regents of the University of California.  All rights reserved.
41539Srgrimes *
51539Srgrimes * Redistribution and use in source and binary forms, with or without
61539Srgrimes * modification, are permitted provided that the following conditions
71539Srgrimes * are met:
81539Srgrimes * 1. Redistributions of source code must retain the above copyright
91539Srgrimes *    notice, this list of conditions and the following disclaimer.
101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111539Srgrimes *    notice, this list of conditions and the following disclaimer in the
121539Srgrimes *    documentation and/or other materials provided with the distribution.
131539Srgrimes * 3. All advertising materials mentioning features or use of this software
141539Srgrimes *    must display the following acknowledgement:
151539Srgrimes *	This product includes software developed by the University of
161539Srgrimes *	California, Berkeley and its contributors.
171539Srgrimes * 4. Neither the name of the University nor the names of its contributors
181539Srgrimes *    may be used to endorse or promote products derived from this software
191539Srgrimes *    without specific prior written permission.
201539Srgrimes *
211539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241539Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311539Srgrimes * SUCH DAMAGE.
3221056Speter * -
3321056Speter * Portions Copyright (c) 1993 by Digital Equipment Corporation.
341539Srgrimes *
3521056Speter * Permission to use, copy, modify, and distribute this software for any
3621056Speter * purpose with or without fee is hereby granted, provided that the above
3721056Speter * copyright notice and this permission notice appear in all copies, and that
3821056Speter * the name of Digital Equipment Corporation not be used in advertising or
3921056Speter * publicity pertaining to distribution of the document or software without
4021056Speter * specific, written prior permission.
4121056Speter *
4221056Speter * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
4321056Speter * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
4421056Speter * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
4521056Speter * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
4621056Speter * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
4721056Speter * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
4821056Speter * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
4921056Speter * SOFTWARE.
5021056Speter *
511539Srgrimes *	@(#)inet.h	8.1 (Berkeley) 6/2/93
5221056Speter *	From: inet.h,v 8.6 1996/08/08 06:54:29 vixie Exp
5321056Speter *	$Id: inet.h,v 1.4 1996/08/29 20:01:00 peter Exp $
541539Srgrimes */
551539Srgrimes
562163Spaul#ifndef _ARPA_INET_H_
572163Spaul#define	_ARPA_INET_H_
581539Srgrimes
5916352Swollman/* External definitions for functions in inet(3), addr2ascii(3) */
601539Srgrimes
6121056Speter#include <sys/types.h>
621539Srgrimes#include <sys/cdefs.h>
631539Srgrimes
6416352Swollmanstruct in_addr;
6516352Swollman
661539Srgrimes__BEGIN_DECLS
6716352Swollmanint		 ascii2addr __P((int, const char *, void *));
6816352Swollmanchar		*addr2ascii __P((int, const void *, int, char *));
691539Srgrimesunsigned long	 inet_addr __P((const char *));
701539Srgrimesint		 inet_aton __P((const char *, struct in_addr *));
711539Srgrimesunsigned long	 inet_lnaof __P((struct in_addr));
721539Srgrimesstruct in_addr	 inet_makeaddr __P((u_long , u_long));
7321056Speterchar *		 inet_neta __P((u_long, char *, size_t));
741539Srgrimesunsigned long	 inet_netof __P((struct in_addr));
751539Srgrimesunsigned long	 inet_network __P((const char *));
7621056Speterchar		*inet_net_ntop __P((int, const void *, int, char *, size_t));
7721056Speterint		 inet_net_pton __P((int, const char *, void *, size_t));
781539Srgrimeschar		*inet_ntoa __P((struct in_addr));
7921056Speterint              inet_pton __P((int, const char *, void *));
8021056Speterconst char	*inet_ntop __P((int, const void *, char *, size_t));
8121056Speteru_int		 inet_nsap_addr __P((const char *, u_char *, int));
8221056Speterchar		*inet_nsap_ntoa __P((int, const u_char *, char *));
831539Srgrimes__END_DECLS
841539Srgrimes
851539Srgrimes#endif /* !_INET_H_ */
86