Imported tab->space correction by redhat
[infodrom/manpages-de] / man2 / connect.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
4 .\" Copyright 1996 C.Schmidt - deutsche Übersetzung (c.schmidt@ius.gun.de)
5 .\"
6 .\" KONSTRUKTIVE Kritik oder ein netter Hinweis auf Fehler, aller
7 .\" Art, würden mich freuen. Danke!
8 .\"
9 .\" Nach dem Übersetzen dieser Manualpage muss ich "vermeindlich
10 .\" schlecht eingedeutschte Bedinungsanleitungen" auch aus einem
11 .\" Blickwinkel betrachten ;-)))
12 .\"
13 .\" Portions extracted from /usr/include/sys/socket.h, which does not have
14 .\" any authorship information in it.  It is probably available under the GPL.
15 .\"
16 .\" Permission is granted to make and distribute verbatim copies of this
17 .\" manual provided the copyright notice and this permission notice are
18 .\" preserved on all copies.
19 .\"
20 .\" Permission is granted to copy and distribute modified versions of this
21 .\" manual under the conditions for verbatim copying, provided that the
22 .\" entire resulting derived work is distributed under the terms of a
23 .\" permission notice identical to this one
24 .\" 
25 .\" Since the Linux kernel and libraries are constantly changing, this
26 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
27 .\" responsibility for errors or omissions, or for damages resulting from
28 .\" the use of the information contained herein.  The author(s) may not
29 .\" have taken the same level of care in the production of this manual,
30 .\" which is licensed free of charge, as they might when working
31 .\" professionally.
32 .\" 
33 .\" Formatted or processed versions of this manual, if unaccompanied by
34 .\" the source, must acknowledge the copyright and authors of this work.
35 .\"
36 .\"
37 .\" Other portions are from the 6.9 (Berkeley) 3/10/91 man page:
38 .\"
39 .\" Copyright (c) 1983 The Regents of the University of California.
40 .\" All rights reserved.
41 .\"
42 .\" Redistribution and use in source and binary forms, with or without
43 .\" modification, are permitted provided that the following conditions
44 .\" are met:
45 .\" 1. Redistributions of source code must retain the above copyright
46 .\"    notice, this list of conditions and the following disclaimer.
47 .\" 2. Redistributions in binary form must reproduce the above copyright
48 .\"    notice, this list of conditions and the following disclaimer in the
49 .\"    documentation and/or other materials provided with the distribution.
50 .\" 3. All advertising materials mentioning features or use of this software
51 .\"    must display the following acknowledgement:
52 .\"     This product includes software developed by the University of
53 .\"     California, Berkeley and its contributors.
54 .\" 4. Neither the name of the University nor the names of its contributors
55 .\"    may be used to endorse or promote products derived from this software
56 .\"    without specific prior written permission.
57 .\"
58 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
59 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
60 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
61 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
62 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
63 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
64 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
65 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
66 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
67 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
68 .\" SUCH DAMAGE.
69 .\"
70 .\" Modified Mon Jun 10 00:55:48 1996 by Martin Schulze (joey@linux.de)
71 .\"
72 .TH CONNECT 2 "23. Juli 1993" "Linux 0.99.11" "Linux German Programmer's Manual"
73 .SH BEZEICHNUNG
74 connect \- Verbindungsaufbau zu einem \(lqSocket\(rq
75 .SH ÜBERSICHT
76 .B #include <sys/types.h>
77 .br
78 .B #include <sys/socket.h>
79 .sp
80 .BI "int connect(int " sockfd ", struct sockaddr *" serv_addr ", int
81 .BI " addrlen );
82 .SH BESCHREIBUNG
83 Der Parameter
84 .I sockfd
85 ist ein \(lqsocket\(rq.
86 Wenn es vom Typ
87 .BR SOCK_DGRAM
88 ist, dann beschreibt dieser Parameter den \(lq Verbindungspartner\(rq
89 mit/über welchen der \(lqsocket\(rq in Verbindung gebracht wird.
90 Diese Adresse ist die, zu der \(lqdatagrams\(rq gesendet werden, und die
91 einzigste Adresse, von der \(lqdatagrams\(rq empfangen werden können.
92 Wenn das \(lqsocket\(rq vom Typ
93 .B SOCK_STREAM
94 ist, wird dieser Aufruf versuchen, eine Verbindung zu einem anderen
95 \(lqsocket\(rq aufzubauen.  Das andere \(lqsocket\(rq wird durch
96 .BR serv_addr ,
97 welches die Adresse innerhalb des Kommunikations-Adressraumes des
98 \(lqsocket\(rq bezeichnet, festgelegt.  Jeder derartige Adressraum
99 interpretiert
100 .BR serv_addr
101 Parameter auf seine eigene Weise.
102
103 Generell sollten \(lqstream sockets\(rq nur einen
104 .B connect
105 benutzen.
106
107 \(lqDatagram sockets\(rq können mit aller Warscheinlichkeit
108 .B connect
109 öfter verwenden. \(lqDatagram sockets\(rq werden beim Verbinden mit
110 unzulässigen Adressen mit aller Wahrscheinlichkeit eine \(lqnull addresse\(rq
111 zur Fehlerbehandlung zurückgeben.
112 .SH "RÜCKGABEWERT"
113 Wird die Verbindung zufriedenstellend Hergestellt, so wird eine 
114 .B 0 (zero)
115 zurückgegeben, im Fehlerfall wird \-1 zurückgegeben.
116 Zusätzlich wird 
117 .I errno
118 auf den passenden Wert gesetzt. 
119 .SH FEHLER, BUGS
120 Sieh in die Kernel Sourcen... ;-)
121 .SH COPYRIGHT
122 Copyright \(co 1993 Rickard E. Faith (faith@cs.unc.edu)
123
124 Copyright \(co 1996 Christian Schmidt <c.schmidt@ius.gun.de>
125 .PP
126 Dieses Manual darf sowohl in der Original, als auch in der deutschen
127 Version mit folgender Einschränkung benutzt, Vervielfältigt und Vertrieben
128 werden.  Dieser Copyright-Abschnitt und der \(lqHeader\(rq muss unverändert
129 in allen Kopien beibehalten werden. Ferner sind die zusätzlichen
130 Vereinbarungen
131 im \(lqHeader\(rq dieses Manuals zu beachten.
132 Der Übersetzter in das Deutsche wird sich 
133 .B nie
134 wieder in seinem Leben über schlecht eingedeutschte Technische Beschreibungen
135 aufregen ;-)   Bei \(lqnicht Verstehbarkeit\(rq bleibt nur der Verweis auf
136 das englischsprachige Original dieser Manual Seite...
137 .SH GESCHICHTE
138 Der
139 .B connect
140 Aufruf existiert seit BSD 4.2
141 .SH "SIEHE AUCH"
142 .BR accept (2),
143 .BR bind (2),
144 .BR listen (2),
145 .BR socket (2),
146 .BR getsockname (2).