in.h (92723) | in.h (93514) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1990, 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)in.h 8.3 (Berkeley) 1/3/94 | 1/* 2 * Copyright (c) 1982, 1986, 1990, 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)in.h 8.3 (Berkeley) 1/3/94 |
34 * $FreeBSD: head/sys/netinet/in.h 92723 2002-03-19 21:25:46Z alfred $ | 34 * $FreeBSD: head/sys/netinet/in.h 93514 2002-04-01 08:12:25Z mike $ |
35 */ 36 37#ifndef _NETINET_IN_H_ 38#define _NETINET_IN_H_ 39 | 35 */ 36 37#ifndef _NETINET_IN_H_ 38#define _NETINET_IN_H_ 39 |
40#include <sys/_types.h> 41 |
|
40/* 41 * Constants and structures defined by the internet system, 42 * Per RFC 790, September 1981, and numerous additions. 43 */ 44 45/* 46 * Protocols (RFC 1700) 47 */ --- 177 unchanged lines hidden (view full) --- 225 * but higher than IPPORT_RESERVEDSTART. Traditionally the start value was 226 * 512, but that conflicts with some well-known-services that firewalls may 227 * have a fit if we use. 228 */ 229#define IPPORT_RESERVEDSTART 600 230 231#define IPPORT_MAX 65535 232 | 42/* 43 * Constants and structures defined by the internet system, 44 * Per RFC 790, September 1981, and numerous additions. 45 */ 46 47/* 48 * Protocols (RFC 1700) 49 */ --- 177 unchanged lines hidden (view full) --- 227 * but higher than IPPORT_RESERVEDSTART. Traditionally the start value was 228 * 512, but that conflicts with some well-known-services that firewalls may 229 * have a fit if we use. 230 */ 231#define IPPORT_RESERVEDSTART 600 232 233#define IPPORT_MAX 65535 234 |
233#ifndef _IN_ADDR_T_DECLARED_ 234typedef __uint32_t in_addr_t; 235#define _IN_ADDR_T_DECLARED_ | 235#ifndef _UINT8_T_DECLARED 236typedef __uint8_t uint8_t; 237#define _UINT8_T_DECLARED |
236#endif 237 | 238#endif 239 |
238#ifndef _IN_PORT_T_DECLARED_ 239typedef __uint16_t in_port_t; 240#define _IN_PORT_T_DECLARED_ | 240#ifndef _UINT16_T_DECLARED 241typedef __uint16_t uint16_t; 242#define _UINT16_T_DECLARED |
241#endif 242 | 243#endif 244 |
245#ifndef _UINT32_T_DECLARED 246typedef __uint32_t uint32_t; 247#define _UINT32_T_DECLARED 248#endif 249 250#ifndef _IN_ADDR_T_DECLARED 251typedef uint32_t in_addr_t; 252#define _IN_ADDR_T_DECLARED 253#endif 254 255#ifndef _IN_PORT_T_DECLARED 256typedef uint16_t in_port_t; 257#define _IN_PORT_T_DECLARED 258#endif 259 |
|
243/* 244 * Internet address (a structure for historical reasons) 245 */ 246#ifndef _STRUCT_IN_ADDR_DECLARED 247struct in_addr { 248 in_addr_t s_addr; 249}; 250#define _STRUCT_IN_ADDR_DECLARED --- 247 unchanged lines hidden (view full) --- 498#define sintosa(sin) ((struct sockaddr *)(sin)) 499#define ifatoia(ifa) ((struct in_ifaddr *)(ifa)) 500 501#else /* !_KERNEL */ 502 503#ifndef _BYTEORDER_PROTOTYPED 504#define _BYTEORDER_PROTOTYPED 505__BEGIN_DECLS | 260/* 261 * Internet address (a structure for historical reasons) 262 */ 263#ifndef _STRUCT_IN_ADDR_DECLARED 264struct in_addr { 265 in_addr_t s_addr; 266}; 267#define _STRUCT_IN_ADDR_DECLARED --- 247 unchanged lines hidden (view full) --- 515#define sintosa(sin) ((struct sockaddr *)(sin)) 516#define ifatoia(ifa) ((struct in_ifaddr *)(ifa)) 517 518#else /* !_KERNEL */ 519 520#ifndef _BYTEORDER_PROTOTYPED 521#define _BYTEORDER_PROTOTYPED 522__BEGIN_DECLS |
506__uint32_t htonl(__uint32_t); 507__uint16_t htons(__uint16_t); 508__uint32_t ntohl(__uint32_t); 509__uint16_t ntohs(__uint16_t); | 523uint32_t htonl(uint32_t); 524uint16_t htons(uint16_t); 525uint32_t ntohl(uint32_t); 526uint16_t ntohs(uint16_t); |
510__END_DECLS 511#endif 512 513#ifndef _BYTEORDER_FUNC_DEFINED 514#define _BYTEORDER_FUNC_DEFINED 515#define htonl(x) __htonl(x) 516#define htons(x) __htons(x) 517#define ntohl(x) __ntohl(x) 518#define ntohs(x) __ntohs(x) 519#endif 520 521#endif /* _KERNEL */ 522 523#endif | 527__END_DECLS 528#endif 529 530#ifndef _BYTEORDER_FUNC_DEFINED 531#define _BYTEORDER_FUNC_DEFINED 532#define htonl(x) __htonl(x) 533#define htons(x) __htons(x) 534#define ntohl(x) __ntohl(x) 535#define ntohs(x) __ntohs(x) 536#endif 537 538#endif /* _KERNEL */ 539 540#endif |