Deleted Added
full compact
inet.h (87159) inet.h (90868)
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 33 unchanged lines hidden (view full) ---

42 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
43 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
44 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
45 * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
46 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
47 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
48 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
49 * SOFTWARE.
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 33 unchanged lines hidden (view full) ---

42 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
43 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
44 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
45 * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
46 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
47 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
48 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
49 * SOFTWARE.
50 */
51
52/*
50 *
53 * @(#)inet.h 8.1 (Berkeley) 6/2/93
54 * From: Id: inet.h,v 8.5 1997/01/29 08:48:09 vixie Exp $
51 * @(#)inet.h 8.1 (Berkeley) 6/2/93
52 * From: Id: inet.h,v 8.5 1997/01/29 08:48:09 vixie Exp $
55 * $FreeBSD: head/include/arpa/inet.h 87159 2001-12-01 03:48:15Z mike $
53 * $FreeBSD: head/include/arpa/inet.h 90868 2002-02-18 20:35:27Z mike $
56 */
57
58#ifndef _ARPA_INET_H_
59#define _ARPA_INET_H_
60
61/* External definitions for functions in inet(3), addr2ascii(3) */
62
63#include <sys/cdefs.h>
64#include <machine/ansi.h>
65
54 */
55
56#ifndef _ARPA_INET_H_
57#define _ARPA_INET_H_
58
59/* External definitions for functions in inet(3), addr2ascii(3) */
60
61#include <sys/cdefs.h>
62#include <machine/ansi.h>
63
64/* Required for byteorder(3) functions. */
65#include <machine/endian.h>
66
66#ifndef _IN_ADDR_T_DECLARED_
67typedef __uint32_t in_addr_t;
68#define _IN_ADDR_T_DECLARED_
69#endif
70
71#ifndef _IN_PORT_T_DECLARED_
72typedef __uint16_t in_port_t;
73#define _IN_PORT_T_DECLARED_

--- 35 unchanged lines hidden (view full) ---

109#define inet_net_pton __inet_net_pton
110#define inet_ntoa __inet_ntoa
111#define inet_pton __inet_pton
112#define inet_ntop __inet_ntop
113#define inet_nsap_addr __inet_nsap_addr
114#define inet_nsap_ntoa __inet_nsap_ntoa
115#endif /* !_POSIX_SOURCE */
116
67#ifndef _IN_ADDR_T_DECLARED_
68typedef __uint32_t in_addr_t;
69#define _IN_ADDR_T_DECLARED_
70#endif
71
72#ifndef _IN_PORT_T_DECLARED_
73typedef __uint16_t in_port_t;
74#define _IN_PORT_T_DECLARED_

--- 35 unchanged lines hidden (view full) ---

110#define inet_net_pton __inet_net_pton
111#define inet_ntoa __inet_ntoa
112#define inet_pton __inet_pton
113#define inet_ntop __inet_ntop
114#define inet_nsap_addr __inet_nsap_addr
115#define inet_nsap_ntoa __inet_nsap_ntoa
116#endif /* !_POSIX_SOURCE */
117
118#ifndef _BYTEORDER_FUNC_DEFINED
119#define _BYTEORDER_FUNC_DEFINED
120#define htonl(x) __htonl(x)
121#define htons(x) __htons(x)
122#define ntohl(x) __ntohl(x)
123#define ntohs(x) __ntohs(x)
124#endif
125
117__BEGIN_DECLS
126__BEGIN_DECLS
127__uint32_t htonl(__uint32_t);
128__uint16_t htons(__uint16_t);
118in_addr_t inet_addr __P((const char *));
119char *inet_ntoa __P((struct in_addr));
120const char *inet_ntop __P((int, const void *, char *, socklen_t));
121int inet_pton __P((int, const char *, void *));
129in_addr_t inet_addr __P((const char *));
130char *inet_ntoa __P((struct in_addr));
131const char *inet_ntop __P((int, const void *, char *, socklen_t));
132int inet_pton __P((int, const char *, void *));
122/*
123 * XXX missing: ntohl() family.
124 */
133__uint32_t ntohl(__uint32_t);
134__uint16_t ntohs(__uint16_t);
125
126/* Nonstandard functions. */
127#ifndef _POSIX_SOURCE
128int ascii2addr __P((int, const char *, void *));
129char *addr2ascii __P((int, const void *, int, char *));
130int inet_aton __P((const char *, struct in_addr *));
131in_addr_t inet_lnaof __P((struct in_addr));
132struct in_addr inet_makeaddr __P((in_addr_t, in_addr_t));
133char * inet_neta __P((in_addr_t, char *, size_t));
134in_addr_t inet_netof __P((struct in_addr));
135in_addr_t inet_network __P((const char *));
136char *inet_net_ntop __P((int, const void *, int, char *, size_t));
137int inet_net_pton __P((int, const char *, void *, size_t));
138unsigned inet_nsap_addr __P((const char *, unsigned char *, int));
139char *inet_nsap_ntoa __P((int, const unsigned char *, char *));
140#endif /* !_POSIX_SOURCE */
141__END_DECLS
142
143#endif /* !_ARPA_INET_H_ */
135
136/* Nonstandard functions. */
137#ifndef _POSIX_SOURCE
138int ascii2addr __P((int, const char *, void *));
139char *addr2ascii __P((int, const void *, int, char *));
140int inet_aton __P((const char *, struct in_addr *));
141in_addr_t inet_lnaof __P((struct in_addr));
142struct in_addr inet_makeaddr __P((in_addr_t, in_addr_t));
143char * inet_neta __P((in_addr_t, char *, size_t));
144in_addr_t inet_netof __P((struct in_addr));
145in_addr_t inet_network __P((const char *));
146char *inet_net_ntop __P((int, const void *, int, char *, size_t));
147int inet_net_pton __P((int, const char *, void *, size_t));
148unsigned inet_nsap_addr __P((const char *, unsigned char *, int));
149char *inet_nsap_ntoa __P((int, const unsigned char *, char *));
150#endif /* !_POSIX_SOURCE */
151__END_DECLS
152
153#endif /* !_ARPA_INET_H_ */