From owner-doc-jp@jp.freebsd.org  Mon May  7 16:03:37 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id QAA72724;
	Mon, 7 May 2001 16:03:37 +0900 (JST)
	(envelope-from owner-doc-jp@jp.FreeBSD.org)
Received: from TYO201.gate.nec.co.jp (TYO201.gate.nec.co.jp [202.32.8.214])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id QAA72704;
	Mon, 7 May 2001 16:03:27 +0900 (JST)
	(envelope-from y-koga@jp.FreeBSD.org)
Received: from mailgate4.nec.co.jp ([10.7.69.193])
	by TYO201.gate.nec.co.jp (8.9.3/3.7W01041220) with ESMTP id QAA00712;
	Mon, 7 May 2001 16:02:59 +0900 (JST)
Received: from mailsv4.nec.co.jp (mailgate51.nec.co.jp [10.7.69.190]) by mailgate4.nec.co.jp (8.9.3/3.7W-MAILGATE-NEC) with ESMTP
	id QAA13214; Mon, 7 May 2001 16:02:53 +0900 (JST)
Received: from necspl.do.mms.mt.nec.co.jp (necspl.do.mms.mt.nec.co.jp [10.16.5.21]) by mailsv4.nec.co.jp (8.11.3/3.7W-MAILSV-NEC) with ESMTP
	id f4772jV29483; Mon, 7 May 2001 16:02:45 +0900 (JST)
Received: from localhost (localhost [127.0.0.1])
	by  necspl.do.mms.mt.nec.co.jp (8.11.3/8.11.3) with ESMTP id f4772iV36934;
	Mon, 7 May 2001 16:02:44 +0900 (JST)
Date: Mon, 07 May 2001 16:02:44 +0900 (JST)
Message-Id: <20010507.160244.38687280.y-koga@jp.FreeBSD.org>
To: doc-jp@jp.FreeBSD.org
From: Koga Youichirou <y-koga@jp.freebsd.org>
In-Reply-To: <20010506122822.23188.qmail@smtp.246.ne.jp>
References: <20010506122822.23188.qmail@smtp.246.ne.jp>
X-Mailer: Mew version 1.95b121 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Mon_May__7_16:02:44_2001_505)--"
Content-Transfer-Encoding: 7bit
Reply-To: doc-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: doc-jp 8190
Subject: [doc-jp 8190] submit book.11.sgml
Errors-To: owner-doc-jp@jp.freebsd.org
Sender: owner-doc-jp@jp.freebsd.org
X-Originator: y-koga@jp.freebsd.org

----Next_Part(Mon_May__7_16:02:44_2001_505)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

$B$3$,(B:
> 4.4BSD $B0-KbK\$N(B
> book.11.sgml Interprocess Communication ($B%W%m%;%94VDL?.(B)
> $BM=Ls$7$^$9!#(B
> $B!t2<Lu$O$7$?$1$I!"MQ8l$r?&>l$KCV$$$F$$$k;qNA$GD4@0$7$J$/$A$c!#(B

$B7k6I$"$^$j$$$8$j$^$;$s$G$7$?$,!"Aw$j$^$9!#(B
----
$B$3$,$h$&$$$A$m$&(B

----Next_Part(Mon_May__7_16:02:44_2001_505)--
Content-Type: Text/Sgml; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="book.13j.sgml"

    <sect1>
      <title>Interprocess Communication</title>
      <title>$B%W%m%;%94VDL?.(B (IPC)</title>
      
      <para>Interprocess communication in 4.4BSD is organized in
	<emphasis>communication domains</emphasis>.
	Domains currently supported include the
	<emphasis>local domain</emphasis>,
	for communication between processes executing on the same machine; the
	<emphasis>internet domain</emphasis>,
	for communication between processes using the
	TCP/IP
	protocol suite (perhaps within the Internet); the
	ISO/OSI
	protocol family for communication between sites required to run them;
	and the
	<emphasis>XNS domain</emphasis>,
	for communication between processes using the
	XEROX
	Network Systems
	(XNS)
	protocols.</para>

      <para>4.4BSD $B$N%W%m%;%94VDL?.(B (IPC) $B$O(B, <emphasis>$B%3%_%e%K%1!<%7%g%s(B
	$B%I%a%$%s(B</emphasis>$BFb$GF/$/$h$&$K$J$C$F$$$^$9(B. $B8=:_%5%]!<%H$5$l$F(B
	$B$$$k%I%a%$%s$K$O(B, $BF1$8%^%7%s>e$G<B9T$7$F$$$kJ#?t$N%W%m%;%94V(B
	$B$G$NDL?.MQ$N(B<emphasis>$B%m!<%+%k%I%a%$%s(B</emphasis>, 
	TCP/IP $B%W%m%H%3%k%9%$!<%HMQ$N(B ($B$*$=$i$/(B the Internet $BFb(B)
	<emphasis>$B%$%s%?!<%M%C%H%I%a%$%s(B</emphasis>, 
	ISO/OSI $B%W%m%H%3%k%U%!%_%j$G$NDL?.$r9T$J$&$3$H$,I,MW$J%5%$%H4VDL?.MQ$N(B ISO/OSI
	$B%W%m%H%3%k%U%!%_%j(B, 
	XEROX Network Systems (XNS) $B$r;HMQ$7$?%W%m%;%94VDL?.MQ$N(B 
	<emphasis>XNS $B%I%a%$%s(B</emphasis>$B$,4^$^$l$F$$$^$9(B. </para>

      <para>Within a domain, communication takes place between communication
	endpoints known as
	<emphasis>sockets</emphasis>.
	As mentioned in
	Section 2.6,
	the
	<emphasis>socket</emphasis>
	system call creates a socket and returns a descriptor;
	other
	IPC
	system calls are described in
	Chapter 11.
	Each socket has a type that defines its communications semantics;
	these semantics include properties such as reliability, ordering,
	and prevention of duplication of messages.</para>

      <para>$B%I%a%$%sFb$G$O(B, <emphasis>$B%=%1%C%H(B</emphasis>$B$H$7$FCN$i$l(B
	$B$F$$$kDL?.=*C<4V$GDL?.$,9T$J$o$l$^$9(B. 
	2.6 $B@a$G@bL@$7$F$$$k$h$&$K(B, 
	<emphasis>soket</emphasis>
	$B%7%9%F%`%3!<%k$O%=%1%C%H$r@8@.$7(B, $B$=$N5-=R;R$rJV$7$^$9(B. 
	$BB>$N(B IPC $B%7%9%F%`%3!<%k$K$D$$$F$O(B 11 $B>O$G2r@b$7$^$9(B. 
	$B3F%=%1%C%H$O(B, $BDL?.%;%^%s%F%#%/%9$rDj5A$7$?7?$r;}$A$^$9(B. 
	$B$3$N%;%^%s%F%#%/%9$K$O?.Mj@-(B, $B=g=x(B, $B%a%C%;!<%8$N=EJ#KI;_$,(B
	$B4^$^$l$F$$$^$9(B. </para>

      <para>Each socket has associated with it a
	<emphasis>communication protocol</emphasis>.
	This protocol provides the semantics required
	by the socket according to the latter's type.
	Applications may request a specific protocol when creating a socket, or
	may allow the system to select a protocol that is appropriate for the type
	of socket being created.</para>

      <para>$B3F%=%1%C%H$O(B, <emphasis>$BDL?.%W%m%H%3%k(B</emphasis>
	$B$H4XO"$7$F$$$^$9(B. 
	$B$3$3$G$N%W%m%H%3%k$O(B, $BDL?.Aj<j$N%=%1%C%H$N7?$K=>$C$F(B
	$B$=$N%=%1%C%H$GMW5a$5$l$F$$$k%;%^%s%F%#%/%9$rDs6!$7$^$9(B. 
	$B%"%W%j%1!<%7%g%s$O(B, $B%=%1%C%H$r@8@.$9$k:]$KFCDj$N%W%m%H%3%k$r(B
	$BMW5a$9$k$3$H$,$G$-$^$9$7(B, $B$^$?(B, $B$=$N%7%9%F%`$O(B, $B>-Mh@8@.$5$l$k(B
	$B%=%1%C%H$N7?$K$U$5$o$7$$%W%m%H%3%k$rA*Br$9$k$h$&$K$9$k$3$H$b(B
	$B2DG=$G$9(B. </para>

      <para>Sockets may have addresses bound to them.
	The form and meaning of socket addresses are dependent on the
	communication domain in which the socket is created.
	Binding a name to a socket in the
	local domain causes a file to be created in the filesystem.</para>

      <para>$B%=%1%C%H$O(B, $B$=$N%=%1%C%H$H4XO"$E$1$5$l$?(B ($B%P%$%s%I$5$l$?(B) 
	$B%"%I%l%9$r;}$D$3$H$,$G$-$^$9(B. 
	$B%=%1%C%H%"%I%l%9$N7A<0$H0UL#$O(B, $B$=$N%=%1%C%H$,@8@.$5$l$?(B
	$B%3%_%e%K%1!<%7%g%s%I%a%$%s$K0MB8$7$^$9(B. 
	$B%m!<%+%k%I%a%$%s$K$*$$$F%=%1%C%H$KL>A0$r%P%$%s%I$9$k$H(B, 
	$B$=$N%U%!%$%k%7%9%F%`$K$*$$$F%U%!%$%k$,@8@.$5$l$^$9(B. </para>

      <para>Normal data transmitted and received through sockets are untyped.
	Data-representation issues are the responsibility of libraries built
	on top of the interprocess-communication facilities.
	In addition to transporting normal data, communication domains may
	support the transmission and reception of specially typed data, termed
	<emphasis>access rights</emphasis>.
	The local domain, for example,
	uses this facility to pass descriptors between processes.</para>

      <para>$B%=%1%C%H$rDL$8$FAw<u?.$5$l$kDL>o$N%G!<%?$O7?$E$1$5$l$F$$$^$;$s(B. 
	$B%G!<%?I=8=$K$D$$$F$O(B, $B%W%m%;%94VDL?.%U%!%7%j%F%#$N%H%C%W$K4p$E$/(B
	$B%i%$%V%i%j$K@UG$$,$"$j$^$9(B. 
	$BDL>o%G!<%?$NG[Aw$K2C$($F(B, $B%3%_%e%K%1!<%7%g%s%I%a%$%s$O(B
	<emphasis>access rights</emphasis> $B$H$$$&FCJL$J7?$N%G!<%?$N(B
	$BAw<u?.$r%5%]!<%H$9$k$3$H$,$G$-$^$9(B. 
	$BNc$($P(B, $B%m!<%+%k%I%a%$%s$O%W%m%;%94V$G5-=R;R$rEO$9$?$a$K(B, 
	$B$3$N%U%!%7%j%F%#$r;HMQ$7$^$9(B. </para>

      <para>Networking implementations on UNIX before 4.2BSD
	usually worked by overloading the character-device interfaces.
	One goal of the socket interface was for naive
	programs to be able to work without change on stream-style connections.
	Such programs can work only if the
	<emphasis>read</emphasis>
	and
	<emphasis>write</emphasis>
	systems calls are unchanged.
	Consequently, the original interfaces were left intact,
	and were made to work on stream-type sockets.
	A new interface was added for more complicated sockets,
	such as those used to send datagrams, with which a destination address
	must be presented with each
	<emphasis>send</emphasis>
	call.</para>

      <para>4.2BSD $B$h$jA0$N(B UNIX $B$K$*$1$k%M%C%H%o!<%-%s%0$N<BAu$O(B, 
	$BBgDq%-%c%i%/%?%G%P%$%9%$%s%?%U%'!<%9$r%*!<%P%m!<%I$5$;$k$3$H$G(B
	$BF0:n$7$F$$$^$7$?(B. 
	$B%=%1%C%H%$%s%?%U%'!<%9$NL\E*$N0l$D$O(B, $BC1=c$J%W%m%0%i%`$,(B
	$B%9%H%j!<%`7?$NDL?.$rJQ99$;$:$KF0:n$9$k$h$&$K$9$k$3$H$G$9(B. 
	$B$=$N$h$&$J%W%m%0%i%`$O(B, <emphasis>read</emphasis> $B$H(B
	<emphasis>write</emphasis> $B$N%7%9%F%`%3!<%k$,JQ99$5$l$J$1$l$P(B
	$BF0:n$7$^$9(B. 
	$BEvA3(B, $B85$N%$%s%?%U%'!<%9$,$=$N$^$^;D$5$l$l$P(B, 
	$B%9%H%j!<%`7?$N%=%1%C%H>e$GF0:n$7B3$1$k$h$&$K$J$j$^$9(B. 
	<emphasis>send</emphasis> $B$N3F8F$S=P$7$G;XDj$7$J$1$l$P$J$i$J$$(B
	$BAw?.@h%"%I%l%9$r;}$D%G!<%?%0%i%`$rAw?.$9$k$h$&$J(B, 
	$B$h$jJ#;($J%=%1%C%HMQ$K?7$7$$%$%s%?%U%'!<%9$,DI2C$5$l$^$7$?(B. </para>

      <para>Another benefit is that the new interface is highly portable.
	Shortly after a test release was available from Berkeley,
	the socket interface had been ported to System III
	by a UNIX vendor
	(although AT&amp;T did not support the socket interface
	until the release of System V Release 4,
	deciding instead to use the
	Eighth Edition stream mechanism).
	The socket interface was also ported to run in many
	Ethernet boards by vendors, such as Excelan and Interlan, that were
	selling into the PC market, where the machines were
	too small to run networking in the main processor.
	More recently, the socket interface was used as the basis for
	Microsoft's Winsock networking interface for Windows.</para>

      <para>$B$b$&0l$D$NMxE@$O(B, $B?7$7$$%$%s%?%U%'!<%9$N%]!<%?%S%j%F%#$,(B
	$BHs>o$KNI$$$H$$$&$3$H$G$9(B. 
	$B%P!<%/%l!<$+$iF~<j$G$-$?%F%9%H%j%j!<%9$N$9$08e$G(B, 
	$B%=%1%C%H%$%s%?%U%'!<%9$O(B UNIX $B%Y%s%@$K$h$C$F(B System III
	$B$K0\?"$5$l$^$7$?(B ($B$7$+$7(B, AT&amp;T $B$O(B System V Release 4 
	$B$N%j%j!<%9$^$G%=%1%C%H%$%s%?%U%'!<%9$r%5%]!<%H$;$:(B, 
	$B$=$NBe$o$j$K(B Eighth Edition $B$N%9%H%j!<%`5!9=$r;HMQ$9$k(B
	$B$3$H$r7h$a$^$7$?(B). 
	$B%=%1%C%H%$%s%?%U%'!<%9$O$^$?(B, Excelan $B<R$d(B Interlan $B<R$N$h$&$J(B
	$B%Y%s%@$K$h$C$FB?$/$N%$!<%5%M%C%H%+!<%I$GF0:n$9$k$h$&$K0\?"$5$l(B, 
	$B%^%7%s$,>.$5$9$.$F%a%$%s%W%m%;%C%5Cf$G%M%C%H%o!<%-%s%0$rF0:n(B
	$B$5$;$k$3$H$,$G$-$J$$(B PC $B;T>l$KGd$j=P$5$l$^$7$?(B. 
	$B$4$/:G6a$G$O(B, Microsoft $B<R$N(B Windows $BMQ$N(B Winsock
	$B%M%C%H%o!<%-%s%0%$%s%?%U%'!<%9$N4pHW$H$7$F(B
	$B%=%1%C%H%$%s%?%U%'!<%9$,;H$o$l$^$7$?(B. </para>
    </sect1>

----Next_Part(Mon_May__7_16:02:44_2001_505)----
