]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/Include/arpa/inet.h
StdLib: Remove EfiSocketLib and Ip4Config Protocol dependency.
[mirror_edk2.git] / StdLib / Include / arpa / inet.h
CommitLineData
2aa62f2b 1/* $NetBSD: inet.h,v 1.21.10.1 2007/05/17 21:25:11 jdc Exp $ */\r
2\r
3/*\r
4 * ++Copyright++ 1983, 1993\r
5 * -\r
6 * Copyright (c) 1983, 1993\r
7 * The Regents of the University of California. All rights reserved.\r
8 *\r
9 * Redistribution and use in source and binary forms, with or without\r
10 * modification, are permitted provided that the following conditions\r
11 * are met:\r
12 * 1. Redistributions of source code must retain the above copyright\r
13 * notice, this list of conditions and the following disclaimer.\r
14 * 2. Redistributions in binary form must reproduce the above copyright\r
15 * notice, this list of conditions and the following disclaimer in the\r
16 * documentation and/or other materials provided with the distribution.\r
17 * 3. Neither the name of the University nor the names of its contributors\r
18 * may be used to endorse or promote products derived from this software\r
19 * without specific prior written permission.\r
20 *\r
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\r
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\r
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
31 * SUCH DAMAGE.\r
32 * -\r
33 * Portions Copyright (c) 1993 by Digital Equipment Corporation.\r
34 *\r
35 * Permission to use, copy, modify, and distribute this software for any\r
36 * purpose with or without fee is hereby granted, provided that the above\r
37 * copyright notice and this permission notice appear in all copies, and that\r
38 * the name of Digital Equipment Corporation not be used in advertising or\r
39 * publicity pertaining to distribution of the document or software without\r
40 * specific, written prior permission.\r
41 *\r
42 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL\r
43 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES\r
44 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT\r
45 * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL\r
46 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR\r
47 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS\r
48 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\r
49 * SOFTWARE.\r
50 * -\r
51 * --Copyright--\r
52 */\r
53\r
54/*%\r
55 * @(#)inet.h 8.1 (Berkeley) 6/2/93\r
56 * Id: inet.h,v 1.2.18.1 2005/04/27 05:00:50 sra Exp\r
57 */\r
58\r
59#ifndef _ARPA_INET_H_\r
60#define _ARPA_INET_H_\r
61\r
62/* External definitions for functions in inet(3) */\r
63\r
64#include <sys/ansi.h>\r
65#include <sys/EfiCdefs.h>\r
66#include <sys/featuretest.h>\r
67#include <sys/types.h>\r
68\r
69#include <netinet/in.h>\r
70\r
71#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \\r
72 defined(_NETBSD_SOURCE)\r
73#ifndef socklen_t\r
74typedef __socklen_t socklen_t;\r
75#define socklen_t __socklen_t\r
76#endif\r
77#endif /* _POSIX_C_SOURCE >= 200112 || XOPEN_SOURCE >= 520 || _NETBSD_SOURCE */\r
78\r
79__BEGIN_DECLS\r
80in_addr_t inet_addr(const char *);\r
81in_addr_t inet_lnaof(struct in_addr);\r
82struct in_addr inet_makeaddr(in_addr_t, in_addr_t);\r
83in_addr_t inet_netof(struct in_addr);\r
84in_addr_t inet_network(const char *);\r
85char *inet_ntoa(struct in_addr);\r
86#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \\r
87 defined(_NETBSD_SOURCE)\r
88const char *inet_ntop(int, const void * __restrict,\r
89 char * __restrict, socklen_t);\r
90int inet_pton(int, const char * __restrict,\r
91 void * __restrict);\r
92#endif\r
93#if defined(_NETBSD_SOURCE)\r
94int inet_aton(const char *, struct in_addr *);\r
95char * inet_neta(u_long, char *, size_t);\r
96char *inet_net_ntop(int, const void *, int, char *, size_t);\r
97int inet_net_pton(int, const char *, void *, size_t);\r
98char *inet_cidr_ntop(int, const void *, int, char *, size_t);\r
99int inet_cidr_pton(int, const char *, void *, int *);\r
100u_int inet_nsap_addr(const char *, u_char *, int);\r
101char *inet_nsap_ntoa(int, const u_char *, char *);\r
102#endif\r
103__END_DECLS\r
104\r
105#endif /* _ARPA_INET_H_ */\r