NetBSD Problem Report #677
From gnats Mon Jan 2 07:01:44 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id HAA14463 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 2 Jan 1995 07:01:43 -0800
Message-Id: <199501021403.PAA24897@wipux2.wifo.uni-mannheim.de>
Date: Mon, 2 Jan 1995 15:03:14 +0100
From: Andrew Wheadon <andrew@wipux2.wifo.uni-mannheim.de>
Reply-To: andrew@wipux2.wifo.uni-mannheim.de
To: gnats-bugs@NetBSD.ORG
Subject: talkd still uses osockaddr
X-Send-Pr-Version: 3.2
>Number: 677
>Category: bin
>Synopsis: talkd is still using the osockaddr
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Jan 02 07:05:02 +0000 1995
>Closed-Date: Sun Feb 18 12:38:33 +0000 1996
>Last-Modified: Wed Jul 02 03:04:44 +0000 1997
>Originator: Andrew Wheadon
>Release: 1.1.1995
>Organization:
The cost of living hasn't affected it's popularity. (unknown)
current release=doc host=wipux2.wifo.uni-mannheim.de \ "NetBSD-current mirror"
hostbase=/mit/ftp/pub/NetBSD base=/usr prefix=/usr backup delete use-rel-suffix
>Environment:
System: NetBSD wipux2.wifo.uni-mannheim.de 1.0A NetBSD 1.0A (WIPUX) #0: Fri Dec 30 14:54:51 MET 1994 toor@wipux2.wifo.uni-mannheim.de:/src/src/sys/arch/i386/compile/WIPUX i386
>Description:
/usr/libexec/talkd includes /usr/include/protocols/talkd.h
which defines the structure of CTL_MSG to be
----------
/* !_TALKD_H_ */
typedef struct {
u_char vers; /* protocol version */
u_char type; /* request type, see below */
u_char answer; /* not used */
u_char pad;
u_long id_num; /* message id */
struct osockaddr addr; /* old (4.3) style */
struct osockaddr ctl_addr; /* old (4.3) style */
long pid; /* caller's process id */
#define NAME_SIZE 12
char l_name[NAME_SIZE];/* caller's name */
char r_name[NAME_SIZE];/* callee's name */
#define TTY_SIZE 16
char r_tty[TTY_SIZE];/* callee's tty name */
} CTL_MSG;
-------
unluckily this makes quite a few programs that are trying
to communicate with talk, fail. They seem to want a
structure similar to:
typedef struct {
u_char vers;
char type;
u_short filler;
u_long id_num;
struct sockaddr_in addr;
struct sockaddr_in ctl_addr;
long pid;
char l_name[NAME_SIZE];
char r_name[NAME_SIZE];
char r_tty[TTY_SIZE];
} CTL_MSG;
The only real difference being the usage of
"sockaddr_in" instead of "osockaddr".
Is this a question of SYSV vs. BSD or would
be sensible to change NetBSD to use sockaddr_in
instead ?
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: cgd
State-Changed-When: Mon Jan 2 14:53:06 PST 1995
State-Changed-Why:
as i said in another piece of mail:
> The only real difference being the usage of
> "sockaddr_in" instead of "osockaddr".
a comments on this:
in my opinion, using sockaddr_in (in my opinion) is Just Plain Wrong.
It should either be using a (new) 'struct sockaddr', or an old 'struct
sockaddr' (i.e. a 'struct osockaddr').
> Is this a question of SYSV vs. BSD or would
> be sensible to change NetBSD to use sockaddr_in
> instead ?
I just spent some time looking around on various machines, and i
couldn't find any that used sockaddr_in.
I looked on:
SunOS (uses 'struct sockaddr', but that's the old sockaddr)
ULTRIX (again, uses struct sockaddr, with the old sockaddr)
DEC OSF/1 (uses 'struct osockaddr')
Mach 2.6 (uses 'struct sockaddr, with old sockaddr)
HP/UX (couldn't find any apprently-talk-related files under
/usr/include 8-)
of course, some of those aren't necessarily 'new' talk... 8-)
i've not yet found a system that used sockaddr_in's in talkd.h, though
i don't have access to any "pure-SysV systems."
Given that, and given the fact that talk apparently _has_
standardized on using the old struct sockaddr, and given my opinion
that using 'sockaddr_in' is incorrect anyway, i don't think it's
reasonable to change, unless somebody can point me at something
(e.g. an RFC) that says that 'sockaddr_in' is appropriate.
State-Changed-From-To: feedback->closed
State-Changed-By: mycroft
State-Changed-When: Sun Feb 18 07:38:33 EST 1996
State-Changed-Why:
This is not a bug. See full PR for details.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.