genericopenlibs/cstdlib/LINCARPA/INET.H
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /* INET.H
       
     2  * 
       
     3  * Portions Copyright (c) 1993-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     4  * All rights reserved.
       
     5  */
       
     6 
       
     7 /** @file
       
     8 @publishedAll
       
     9 @released
       
    10 */
       
    11 
       
    12 /*
       
    13  * Copyright (c) 1983, 1993
       
    14  *	The Regents of the University of California.  All rights reserved.
       
    15  *
       
    16  * Redistribution and use in source and binary forms, with or without
       
    17  * modification, are permitted provided that the following conditions
       
    18  * are met:
       
    19  * 1. Redistributions of source code must retain the above copyright
       
    20  *    notice, this list of conditions and the following disclaimer.
       
    21  * 2. Redistributions in binary form must reproduce the above copyright
       
    22  *    notice, this list of conditions and the following disclaimer in the
       
    23  *    documentation and/or other materials provided with the distribution.
       
    24  * 3. All advertising materials mentioning features or use of this software
       
    25  *    must display the following acknowledgement:
       
    26  *	This product includes software developed by the University of
       
    27  *	California, Berkeley and its contributors.
       
    28  * 4. Neither the name of the University nor the names of its contributors
       
    29  *    may be used to endorse or promote products derived from this software
       
    30  *    without specific prior written permission.
       
    31  *
       
    32  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
       
    33  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
       
    34  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
       
    35  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
       
    36  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
       
    37  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
       
    38  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
       
    39  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
       
    40  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
       
    41  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
       
    42  * SUCH DAMAGE.
       
    43  * -
       
    44  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
       
    45  *
       
    46  * Permission to use, copy, modify, and distribute this software for any
       
    47  * purpose with or without fee is hereby granted, provided that the above
       
    48  * copyright notice and this permission notice appear in all copies, and that
       
    49  * the name of Digital Equipment Corporation not be used in advertising or
       
    50  * publicity pertaining to distribution of the document or software without
       
    51  * specific, written prior permission.
       
    52  * 
       
    53  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
       
    54  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
       
    55  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
       
    56  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
       
    57  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
       
    58  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
       
    59  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
       
    60  * SOFTWARE.
       
    61  *
       
    62  *	@(#)inet.h	8.1 (Berkeley) 6/2/93
       
    63  *	From: inet.h,v 8.6 1996/08/08 06:54:29 vixie Exp
       
    64  *	$Id: inet.h,v 1.9 1997/05/07 20:00:19 eivind Exp $
       
    65  */
       
    66 
       
    67 #ifndef _ARPA_INET_H_
       
    68 #define	_ARPA_INET_H_
       
    69 
       
    70 #ifdef __cplusplus
       
    71 extern "C" {
       
    72 #endif
       
    73 
       
    74 #include <_ansi.h>
       
    75 /** External definitions for functions in inet(3), addr2ascii(3) 
       
    76 */
       
    77 
       
    78 #include <sys/types.h>
       
    79 
       
    80 struct in_addr;
       
    81 
       
    82 IMPORT_C unsigned long	 inet_addr (const char *);
       
    83 IMPORT_C int		 inet_aton (const char *, struct in_addr *);
       
    84 IMPORT_C unsigned long	 inet_lnaof (struct in_addr);
       
    85 IMPORT_C struct in_addr	 inet_makeaddr (u_long , u_long);
       
    86 IMPORT_C unsigned long	 inet_netof (struct in_addr);
       
    87 #define inet_network inet_addr
       
    88 
       
    89 #ifndef _REENT_ONLY
       
    90 IMPORT_C char		*inet_ntoa (struct in_addr);
       
    91 #endif /* _REENT_ONLY */
       
    92 
       
    93 int		 ascii2addr (int, const char *, void *);
       
    94 char		*addr2ascii (int, const void *, int, char *);
       
    95 char		*inet_net_ntop (int, const void *, int, char *, size_t);
       
    96 int		 inet_net_pton (int, const char *, void *, size_t);
       
    97 char *		 inet_neta (u_long, char *, size_t);
       
    98 int              inet_pton (int, const char *, void *);
       
    99 const char	*inet_ntop (int, const void *, char *, size_t);
       
   100 u_int		 inet_nsap_addr (const char *, u_char *, int);
       
   101 char		*inet_nsap_ntoa (int, const u_char *, char *);
       
   102 
       
   103 #ifdef __cplusplus
       
   104 }
       
   105 #endif
       
   106 #endif /* !_INET_H_ */