Merge commit 'ad3ad82ad2fb99c424a8482bd1908d08b990ccea'
[unleashed.git] / share / man / man7d / sdp.7d
blobee91ffc27ce1a93a80ecd1f43c09cdbfb94f1e4d
1 '\" te
2 .\" Copyright (c) 2006, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SDP 7D "Nov 13, 2006"
7 .SH NAME
8 sdp \- Sockets Direct Protocol driver
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <socket.h>
13 .fi
15 .LP
16 .nf
17 #include <netinet/in.h>
18 .fi
20 .LP
21 .nf
22 \fBs = socket(AF_INET, SOCK_STREAM, PROTO_SDP);\fR
23 .fi
25 .LP
26 .nf
27 \fBs = socket(AF_INET6, SOCK_STREAM, PROTO_SDP);\fR
28 .fi
30 .SH DESCRIPTION
31 .sp
32 .LP
33 The Sockets Direct Protocol (\fBSDP\fR) is a transport protocol layered over
34 the \fIInfiniband Transport Framework\fR (\fBIBTF\fR). \fBSDP\fR is a standard
35 implementation based on Annex 4 of the \fIInfiniband Architecture Specification
36 Vol 1\fR and provides reliable byte-stream, flow controlled two-way data
37 transmission that closely mimics the Transmission Control Protocol (\fBTCP\fR).
38 .sp
39 .LP
40 \fBSDP\fR supports a sockets-based SOCK_STREAM interface to application
41 programs. It also supports graceful close (including half-closed sockets), IP
42 addressing (IPv4 or IPv6), the connecting/accepting connect model, out-of-band
43 (OOB) data and common socket options. The \fBSDP\fR protocol also supports
44 kernel bypass data transfers and data transfers from send-upper-layer-protocol
45 (ULP) buffers to receive ULP buffers. A \fBSDP\fR message includes a BSDH
46 header followed by data. (A BSDH header advertises the amount of available
47 buffers on the local side).
48 .sp
49 .LP
50 \fBSDP\fR networking functionality is broken into the \fBsdp\fR driver and a
51 function call-based sockfs implementation. A new protocol family of PROTO_SDP
52 is introduced to use the \fBSDP\fR transport provided by the driver.
53 .sp
54 .LP
55 Sockets utilizing \fBSDP\fR are either active or passive. Active sockets
56 initiate connections to passive sockets. Both active and passive sockets must
57 have their local IP or IPv6 address and \fBSDP\fR port number bound with the
58 \fBbind\fR(3SOCKET) system call after the socket is created. By default,
59 \fBSDP\fR sockets are active. A passive socket is created by calling the
60 \fBlisten\fR(3SOCKET) system call after binding the socket with bind(). This
61 process establishes a queueing parameter for the passive socket. Connections to
62 the passive  socket can be received with the \fBaccept\fR(3SOCKET) system call.
63 Active sockets use the \fBconnect\fR(3SOCKET) call after binding to initiate
64 connections.
65 .sp
66 .LP
67 In most cases, \fBSDP\fR sends data when it is presented. When outstanding
68 data is not yet acknowledged, \fBSDP\fR gathers small amounts of output to be
69 sent in a single  packet once an acknowledgement is received. For a small
70 number of clients this packetization may cause significant delays. To
71 circumvent this problem,  \fBSDP\fR provided by the driver supplies
72 SDP_NODELAY, a socket-level boolean option. Note that this behavior is similar
73 to the TCP_NODELAY option.
74 .sp
75 .LP
76 \fBSDP\fR provides an urgent data mechanism that can be invoked using the
77 out-of-band provisions of  \fBsend\fR(3SOCKET). The out-of-band delivery
78 behavior is identical to TCP. The caller may mark one byte as "urgent" with the
79 MSG_OOB  flag to \fBsend\fR(3SOCKET). This sets an "urgent pointer" pointing to
80 the byte in the \fBSDP\fR stream. The receiver of the stream is notified of the
81 urgent data by a \fBSIGURG\fR signal. The SIOCATMARK  \fBioctl\fR(2) request
82 returns a value indicating whether the stream is at the urgent mark. Because
83 the system never returns data across the urgent  mark in a single \fBread\fR(2)
84 call, it is possible to advance to the urgent data in a simple loop which reads
85 data, testing  the  socket with the \fBSIOCATMARK\fR  ioctl() request until it
86 reaches the mark.
87 .SH ADDRESS FORMATS
88 .sp
89 .LP
90 \fBSDP\fR uses  IP/IPv6  addresses to refer to local and remote devices and
91 opens a reliable connected IB connection between two end points. The \fBsdp\fR
92 driver supports a point-to-point connection, however broadcasting and
93 multicasting are not supported.
94 .SH SOCKET OPTIONS
95 .sp
96 .LP
97 \fBSDP\fR supports setsockopt and getsockopt to set and read socket options.
98 Very few socket options affect \fBSDP\fR protocol operations. Other common
99 socket options are  processed but do not affect  SDP  protocol  operation. All
100 socket options are checked for validity. A getsockopt returns the values set or
101 toggled by setsockopt. Socket options that affect protocol operations are
102 SO_LINGER, SO_DEBUG, SO_REUSEADDR and SO_OOBINLINE.
103 .SH ERRORS
105 .ne 2
107 \fB\fBEISCONN\fR\fR
109 .RS 28n
110 A connect() operation was attempted on a socket on which a connect() operation
111 had already  been performed.
115 .ne 2
117 \fB\fBECONNRESET\fR\fR
119 .RS 28n
120 The remote peer forced the connection to be closed. This usually occurs when
121 the remote machine loses state information about the connection due to a crash.
125 .ne 2
127 \fB\fBECONNREFUSED\fR\fR
129 .RS 28n
130 The remote peer actively refused connection establishment. This usually occurs
131 because no process is listening to the port.
135 .ne 2
137 \fB\fBEADDRINUSE\fR\fR
139 .RS 28n
140 A bind() operation was attempted  on a socket with a network address/port pair
141 that has already been bound to another socket.
145 .ne 2
147 \fB\fBEADDRNOTAVAIL\fR\fR
149 .RS 28n
150 A bind() operation was attempted on a socket with a network address for which
151 no network interface exists.
155 .ne 2
157 \fB\fBEACCES\fR\fR
159 .RS 28n
160 A bind() operation was attempted with  a reserved port number and the effective
161 user ID of the process was not the privileged user.
165 .ne 2
167 \fB\fBENOBUFS\fR\fR
169 .RS 28n
170 The system ran out of memory for internal data structures.
173 .SH FILES
175 .ne 2
177 \fB\fB/kernel/drv/sdp\fR\fR
179 .sp .6
180 .RS 4n
181 32-bit \fBELF\fR kernel module (x86).
185 .ne 2
187 \fB\fB/kernel/drv/amd64/sdp\fR\fR
189 .sp .6
190 .RS 4n
191 64-bit \fBELF\fR kernel module (x86).
195 .ne 2
197 \fB\fB/kernel/drv/sparcv9/sdp\fR\fR
199 .sp .6
200 .RS 4n
201 64-bit \fBELF\fR kernel module (SPARC).
205 .ne 2
207 \fB\fB/kernel/drv/sdpib\fR\fR
209 .sp .6
210 .RS 4n
211 32-bit \fBELF\fR kernel module (x86).
215 .ne 2
217 \fB\fB/kernel/drv/amd64/sdpib\fR\fR
219 .sp .6
220 .RS 4n
221 64-bit \fBELF\fR kernel module (x86).
225 .ne 2
227 \fB\fB/kernel/drv/sparcv9/sdpib\fR\fR
229 .sp .6
230 .RS 4n
231 64-bit \fBELF\fR kernel module (SPARC).
234 .SH ATTRIBUTES
237 See \fBattributes\fR(5) for descriptions of the following attribute:
242 box;
243 c | c
244 l | l .
245 ATTRIBUTE TYPE  ATTRIBUTE VALUE
247 Architecture    x86, SPARC
250 .SH SEE ALSO
253 \fBread\fR(2), \fBgetsockopt\fR(3XNET), \fBsocket.h\fR(3HEAD),
254 \fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET),
255 \fBsend\fR(3SOCKET), \fBattributes\fR(5), \fBstandards\fR(5)
258 \fIInfiniband Architecture Specification Vol 1- Annex 4\fR \(em November, 2002