Subject: misc/3804: unix(4) may be expected to mention about macro SUN_LEN(), etc.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <enami@ba2.so-net.or.jp>
List: netbsd-bugs
Date: 06/28/1997 23:37:37
>Number: 3804
>Category: misc
>Synopsis: unix(4) may be expected to mention about macro SUN_LEN(), etc.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people (Misc Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Jun 28 07:50:02 1997
>Last-Modified:
>Originator: enami tsugutomo
>Organization:
>Release: NetBSD-current 1997 June 26
>Environment:
System: NetBSD pavlov.enami.ba2.so-net.or.jp 1.2G NetBSD 1.2G (PAVLOV) #299: Sat Jun 28 11:55:32 JST 1997 enami@pavlov.enami.ba2.so-net.or.jp:/b/netbsd/kernel/compile/PAVLOV i386
>Description:
I think it is better if unix(4) mentions macro SUN_LEN() and so on.
>How-To-Repeat:
Read unix(4). There is nothing about SUN_LEN().
>Fix:
Here is my proposal, which (I tried to :-) describe that
* there is a macro SUN_LEN() and can be used to calculate
the lenght of unix domain address
* to use SUN_LEN() sun_path needs to be terminated by NUL,
but it is not a port of the address
* sun_len field is filled by kernel.
How about it?
Index: unix.4
===================================================================
RCS file: /a/cvsroot/NetBSD/src/share/man/man4/unix.4,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 unix.4
--- unix.4 1996/11/16 10:01:10 1.1.1.1
+++ unix.4 1997/06/28 14:30:18
@@ -84,6 +84,27 @@
.Xr unlink 2
must be used to remove the file.
.Pp
+A length of
+.Tn UNIX Ns -domain
+address, which is needed to
+.Xr bind 2
+or
+.Xr connect 2 ,
+can be calculated by macro
+.Fn SUN_LEN
+defined in
+.Aq Pa sys/un.h .
+Though the
+.Ar sun_path
+field needs to be terminated by a NUL character to be used with
+.Fn SUN_LEN ,
+the NUL is
+.Em not
+a part of address.
+The
+.Ar sun_len
+field is filled to the length by kernel.
+.Pp
The
.Tn UNIX Ns -domain
protocol family does not support broadcast addressing or any form
>Audit-Trail:
>Unformatted: