Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Provide local definitions of in_{addr, port}_t in <netine...



details:   https://anonhg.NetBSD.org/src/rev/0a544cb647dd
branches:  trunk
changeset: 526858:0a544cb647dd
user:      kleink <kleink%NetBSD.org@localhost>
date:      Sun May 12 23:04:15 2002 +0000

description:
Provide local definitions of in_{addr,port}_t in <netinet/in.h> and use
them where deemed appropriate by XNS5.2/POSIX-2001.

diffstat:

 sys/netinet/in.h   |  16 +++++++++++++---
 sys/netinet6/in6.h |   4 ++--
 2 files changed, 15 insertions(+), 5 deletions(-)

diffs (62 lines):

diff -r 3b1f8d28730a -r 0a544cb647dd sys/netinet/in.h
--- a/sys/netinet/in.h  Sun May 12 22:59:50 2002 +0000
+++ b/sys/netinet/in.h  Sun May 12 23:04:15 2002 +0000
@@ -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 @@
  * 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 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];
 };
diff -r 3b1f8d28730a -r 0a544cb647dd sys/netinet6/in6.h
--- a/sys/netinet6/in6.h        Sun May 12 22:59:50 2002 +0000
+++ b/sys/netinet6/in6.h        Sun May 12 23:04:15 2002 +0000
@@ -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 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 */



Home | Main Index | Thread Index | Old Index