s = socket(AF_INET, SOCK_STREAM, PROTO_SDP);
s = socket(AF_INET6, SOCK_STREAM, PROTO_SDP);
SDP supports a sockets-based SOCK_STREAM interface to application programs. It also supports graceful close (including half-closed sockets), IP addressing (IPv4 or IPv6), the connecting/accepting connect model, out-of-band (OOB) data and common socket options. The SDP protocol also supports kernel bypass data transfers and data transfers from send-upper-layer-protocol (ULP) buffers to receive ULP buffers. A SDP message includes a BSDH header followed by data. (A BSDH header advertises the amount of available buffers on the local side).
SDP networking functionality is broken into the sdp driver and a function call-based sockfs implementation. A new protocol family of PROTO_SDP is introduced to use the SDP transport provided by the driver.
Sockets utilizing SDP are either active or passive. Active sockets initiate connections to passive sockets. Both active and passive sockets must have their local IP or IPv6 address and SDP port number bound with the bind(3SOCKET) system call after the socket is created. By default, SDP sockets are active. A passive socket is created by calling the listen(3SOCKET) system call after binding the socket with bind(). This process establishes a queueing parameter for the passive socket. Connections to the passive socket can be received with the accept(3SOCKET) system call. Active sockets use the connect(3SOCKET) call after binding to initiate connections.
In most cases, SDP sends data when it is presented. When outstanding data is not yet acknowledged, SDP gathers small amounts of output to be sent in a single packet once an acknowledgement is received. For a small number of clients this packetization may cause significant delays. To circumvent this problem, SDP provided by the driver supplies SDP_NODELAY, a socket-level boolean option. Note that this behavior is similar to the TCP_NODELAY option.
SDP provides an urgent data mechanism that can be invoked using the out-of-band provisions of send(3SOCKET). The out-of-band delivery behavior is identical to TCP. The caller may mark one byte as "urgent" with the MSG_OOB flag to send(3SOCKET). This sets an "urgent pointer" pointing to the byte in the SDP stream. The receiver of the stream is notified of the urgent data by a SIGURG signal. The SIOCATMARK ioctl(2) request returns a value indicating whether the stream is at the urgent mark. Because the system never returns data across the urgent mark in a single read(2) call, it is possible to advance to the urgent data in a simple loop which reads data, testing the socket with the SIOCATMARK ioctl() request until it reaches the mark.
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
Infiniband Architecture Specification Vol 1- Annex 4 — November, 2002
|June 19, 2021||OmniOS|