Source-Changes-HG archive

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

[src/trunk]: src rename osockaddr to talkd_sockaddr and use that instead.



details:   https://anonhg.NetBSD.org/src/rev/bc8e82482c4f
branches:  trunk
changeset: 584582:bc8e82482c4f
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Sep 24 16:40:01 2005 +0000

description:
rename osockaddr to talkd_sockaddr and use that instead.

diffstat:

 include/protocols/talkd.h |  16 ++++++++++++----
 usr.bin/talk/invite.c     |   6 +++---
 usr.bin/talk/look_up.c    |   6 +++---
 3 files changed, 18 insertions(+), 10 deletions(-)

diffs (98 lines):

diff -r f27907481886 -r bc8e82482c4f include/protocols/talkd.h
--- a/include/protocols/talkd.h Sat Sep 24 15:52:03 2005 +0000
+++ b/include/protocols/talkd.h Sat Sep 24 16:40:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: talkd.h,v 1.8 2003/08/07 09:44:13 agc Exp $    */
+/*     $NetBSD: talkd.h,v 1.9 2005/09/24 16:40:01 christos Exp $       */
 
 /*
  * Copyright (c) 1983, 1993
@@ -53,6 +53,14 @@
  */
 
 /*
+ * 4.3 compat sockaddr
+ */
+struct talkd_sockaddr {
+       u_int16_t       sa_family;      /* address family */
+       char            sa_data[14];    /* up to 14 bytes of direct address */
+};
+
+/*
  * Client->server request message format.
  */
 typedef struct {
@@ -61,8 +69,8 @@
        u_char    answer;               /* not used */
        u_char    pad;
        u_int32_t id_num;               /* message id */
-       struct    osockaddr addr;       /* old (4.3) style */
-       struct    osockaddr ctl_addr;   /* old (4.3) style */
+       struct    talkd_sockaddr addr;  /* old (4.3) style */
+       struct    talkd_sockaddr ctl_addr;/* old (4.3) style */
        int32_t   pid;                  /* caller's process id */
 #define        NAME_SIZE       12
        char      l_name[NAME_SIZE];    /* caller's name */
@@ -80,7 +88,7 @@
        u_char    answer;       /* respose to request message, see below */
        u_char    pad;
        u_int32_t id_num;       /* message id */
-       struct    osockaddr addr; /* address for establishing conversation */
+       struct    talkd_sockaddr addr; /* address for establishing conversation */
 } CTL_RESPONSE;
 
 #define        TALK_VERSION    1               /* protocol version */
diff -r f27907481886 -r bc8e82482c4f usr.bin/talk/invite.c
--- a/usr.bin/talk/invite.c     Sat Sep 24 15:52:03 2005 +0000
+++ b/usr.bin/talk/invite.c     Sat Sep 24 16:40:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: invite.c,v 1.6 2003/08/07 11:16:04 agc Exp $   */
+/*     $NetBSD: invite.c,v 1.7 2005/09/24 16:40:01 christos Exp $      */
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)invite.c   8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: invite.c,v 1.6 2003/08/07 11:16:04 agc Exp $");
+__RCSID("$NetBSD: invite.c,v 1.7 2005/09/24 16:40:01 christos Exp $");
 #endif /* not lint */
 
 #include "talk.h"
@@ -74,7 +74,7 @@
                p_error("Error on attempt to listen for caller");
 #ifdef MSG_EOR
        /* copy new style sockaddr to old, swap family (short in old) */
-       msg.addr = *(struct osockaddr *)&my_addr;  /* XXX new to old  style*/
+       msg.addr = *(struct talkd_sockaddr *)(void *)&my_addr;
        msg.addr.sa_family = htons(my_addr.sin_family);
 #else
        msg.addr = *(struct sockaddr *)&my_addr;
diff -r f27907481886 -r bc8e82482c4f usr.bin/talk/look_up.c
--- a/usr.bin/talk/look_up.c    Sat Sep 24 15:52:03 2005 +0000
+++ b/usr.bin/talk/look_up.c    Sat Sep 24 16:40:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: look_up.c,v 1.6 2003/08/07 11:16:05 agc Exp $  */
+/*     $NetBSD: look_up.c,v 1.7 2005/09/24 16:40:01 christos Exp $     */
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)look_up.c  8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: look_up.c,v 1.6 2003/08/07 11:16:05 agc Exp $");
+__RCSID("$NetBSD: look_up.c,v 1.7 2005/09/24 16:40:01 christos Exp $");
 #endif /* not lint */
 
 #include "talk.h"
@@ -55,7 +55,7 @@
        /* the rest of msg was set up in get_names */
 #ifdef MSG_EOR
        /* copy new style sockaddr to old, swap family (short in old) */
-       msg.ctl_addr = *(struct osockaddr *)&ctl_addr;
+       msg.ctl_addr = *(struct talkd_sockaddr *)(void *)&ctl_addr;
        msg.ctl_addr.sa_family = htons(ctl_addr.sin_family);
 #else
        msg.ctl_addr = *(struct sockaddr *)&ctl_addr;



Home | Main Index | Thread Index | Old Index