Provide local definitions of in_{addr,port}_t in <netinet/in.h> and use
them where deemed appropriate by XNS5.2/POSIX-2001.
This commit is contained in:
parent
cc7147e7f6
commit
602066c0d6
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: in.h,v 1.56 2002/02/24 17:22:21 martin Exp $ */
|
||||
/* $NetBSD: in.h,v 1.57 2002/05/12 23:04:15 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
|
@ -45,6 +45,16 @@
|
|||
|
||||
#include <sys/ansi.h>
|
||||
|
||||
#ifndef in_addr_t
|
||||
typedef __in_addr_t in_addr_t;
|
||||
#define in_addr_t __in_addr_t
|
||||
#endif
|
||||
|
||||
#ifndef in_port_t
|
||||
typedef __in_port_t in_port_t;
|
||||
#define in_port_t __in_port_t
|
||||
#endif
|
||||
|
||||
#ifndef sa_family_t
|
||||
typedef __sa_family_t sa_family_t;
|
||||
#define sa_family_t __sa_family_t
|
||||
|
@ -129,7 +139,7 @@ typedef __sa_family_t sa_family_t;
|
|||
* Internet address (a structure for historical reasons)
|
||||
*/
|
||||
struct in_addr {
|
||||
u_int32_t s_addr;
|
||||
in_addr_t s_addr;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/*
|
||||
|
@ -203,7 +213,7 @@ struct in_addr {
|
|||
struct sockaddr_in {
|
||||
u_int8_t sin_len;
|
||||
sa_family_t sin_family;
|
||||
u_int16_t sin_port;
|
||||
in_port_t sin_port;
|
||||
struct in_addr sin_addr;
|
||||
int8_t sin_zero[8];
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: in6.h,v 1.33 2001/12/21 08:54:54 itojun Exp $ */
|
||||
/* $NetBSD: in6.h,v 1.34 2002/05/12 23:04:15 kleink Exp $ */
|
||||
/* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -143,7 +143,7 @@ struct in6_addr {
|
|||
struct sockaddr_in6 {
|
||||
u_int8_t sin6_len; /* length of this struct(sa_family_t)*/
|
||||
sa_family_t sin6_family; /* AF_INET6 (sa_family_t) */
|
||||
u_int16_t sin6_port; /* Transport layer port # (in_port_t)*/
|
||||
in_port_t sin6_port; /* Transport layer port # (in_port_t)*/
|
||||
u_int32_t sin6_flowinfo; /* IP6 flow information */
|
||||
struct in6_addr sin6_addr; /* IP6 address */
|
||||
u_int32_t sin6_scope_id; /* scope zone index */
|
||||
|
|
Loading…
Reference in New Issue