1 '\" te
   2 .\"  Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved
   3 .\"  Copyright 2015 Nexenta Systems, Inc. All rights reserved.
   4 .\" 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.
   5 .\" 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.
   6 .\" 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]
   7 .TH SOCONFIG 1M "May 21, 2015"
   8 .SH NAME
   9 soconfig \- configure transport providers for use by sockets
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fB/sbin/soconfig\fR \fB-d\fR \fIdir\fR
  14 .fi
  15 
  16 .LP
  17 .nf
  18 \fB/sbin/soconfig\fR \fB-f\fR \fIfile\fR
  19 .fi
  20 
  21 .LP
  22 .nf
  23 \fB/sbin/soconfig\fR \fIfamily\fR \fItype\fR \fIprotocol\fR [\fImodule\fR | \fIpath\fR]
  24 .fi
  25 
  26 .LP
  27 .nf
  28 \fB/sbin/soconfig\fR \fB-l\fR
  29 .fi
  30 
  31 .SH DESCRIPTION
  32 .sp
  33 .LP
  34 The \fBsoconfig\fR utility configures the transport provider driver for use
  35 with sockets. It specifies how the family, type, and protocol parameters in the
  36 \fBsocket\fR(3SOCKET) call are mapped to the name of a transport provider such
  37 as \fB/dev/tcp\fR. This utility can be used to add an additional mapping or
  38 remove a previous mapping.
  39 .sp
  40 .LP
  41 The \fBinit\fR(1M) utility uses \fBsoconfig\fR with the \fBsock2path.d\fR(4)
  42 directory during the booting sequence.
  43 .SH OPTIONS
  44 .sp
  45 .LP
  46 The following options are supported:
  47 .sp
  48 .ne 2
  49 .na
  50 \fB\fB-d\fR \fIdir\fR\fR
  51 .ad
  52 .RS 11n
  53 Set up the \fBsoconfig\fR configuration for each driver
  54 according  to  the  information stored in the
  55 files in \fIdir\fR.
  56 .RE
  57 
  58 .sp
  59 .ne 2
  60 .na
  61 \fB\fB-f\fR \fIfile\fR\fR
  62 .ad
  63 .RS 11n
  64 Set up the \fBsoconfig\fR configuration for each driver according to the
  65 information stored in \fIfile\fR. A \fBsoconfig\fR file consists of lines of at
  66 least the first three fields listed below, separated by spaces:
  67 .sp
  68 \fIfamily  type  protocol  [module | path]\fR
  69 .sp
  70 These fields are described in the \fBOPERANDS\fR section below.
  71 .sp
  72 An example of \fIfile\fR can be found in the \fBEXAMPLES\fR section below.
  73 .RE
  74 
  75 .sp
  76 .ne 2
  77 .na
  78 \fB\fB-l\fR
  79 .ad
  80 .RS 11n
  81 Print the in-kernel socket configuration table.
  82 .RE
  83 
  84 .SH OPERANDS
  85 .sp
  86 .LP
  87 The following operands are supported:
  88 .sp
  89 .ne 2
  90 .na
  91 \fB\fIfamily\fR\fR
  92 .ad
  93 .RS 17n
  94 The protocol family as listed in the \fB/usr/include/sys/socket.h\fR file,
  95 expressed as an integer.
  96 .RE
  97 
  98 .sp
  99 .ne 2
 100 .na
 101 \fB\fItype\fR\fR
 102 .ad
 103 .RS 17n
 104 The socket type as listed in the \fB/usr/include/sys/socket.h\fR file,
 105 expressed as an integer.
 106 .RE
 107 
 108 .sp
 109 .ne 2
 110 .na
 111 \fB\fIprotocol\fR\fR
 112 .ad
 113 .RS 17n
 114 The protocol number as specified in the family-specific \fBinclude\fR file,
 115 expressed as an integer. For example, for \fBAF_INET\fR this number is
 116 specified in \fB/usr/include/netinet/in.h\fR. An unspecified protocol number is
 117 denoted with the value zero.
 118 .RE
 119 
 120 .sp
 121 .ne 2
 122 .na
 123 \fB\fImodule\fR | \fIpath\fR\fR
 124 .ad
 125 .RS 17n
 126 The module name or path name of a device that corresponds to the transport
 127 provider, such as \fBtcp\fR or \fB/dev/tcp\fR. Modules must reside in
 128 \fBkernel/socketmod\fR. A device name must begin with \fB/dev\fR. If this
 129 parameter is specified, the configuration will be added for the specified
 130 family, type, and protocol. If this parameter is not specified, the
 131 configuration will be removed.
 132 .RE
 133 
 134 .SH EXAMPLES
 135 .LP
 136 \fBExample 1 \fRUsing \fBsoconfig\fR
 137 .sp
 138 .LP
 139 The following example sets up a module for family \fBAF_INET\fR and type
 140 \fBSOCK_STREAM\fR:
 141 
 142 .sp
 143 .in +2
 144 .nf
 145 example# \fBsoconfig 2 2 0 tcp\fR
 146 .fi
 147 .in -2
 148 .sp
 149 
 150 .sp
 151 .LP
 152 The following example sets up \fB/dev/tcp\fR for family \fBAF_INET\fR and type
 153 \fBSOCK_STREAM\fR:
 154 
 155 .sp
 156 .in +2
 157 .nf
 158 example# \fBsoconfig 2 2 0 /dev/tcp\fR
 159 .fi
 160 .in -2
 161 .sp
 162 
 163 .sp
 164 .LP
 165 The following is a sample file used with the \fB-f\fR option. Comment lines
 166 begin with a hash mark (\fB#\fR):
 167 
 168 .sp
 169 .in +2
 170 .nf
 171 #   Family  Type  Protocol   Module | Path
 172       2       2       0          tcp
 173       2       2       6          tcp
 174 
 175       2       1       0          udp
 176       2       1       17         udp
 177 
 178       1       2       0          /dev/ticotsord
 179       1       1       0          /dev/ticlts
 180 
 181       2       4       0          icmp
 182 .fi
 183 .in -2
 184 .sp
 185 
 186 .SH FILES
 187 .sp
 188 .ne 2
 189 .na
 190 \fB\fB/etc/sock2path.d\fR\fR
 191 .ad
 192 .RS 18n
 193 Directory containing files with mappings from
 194 sockets  to transport providers.
 195 .RE
 196 
 197 .SH SEE ALSO
 198 .sp
 199 .LP
 200 \fBinit\fR(1M), \fBsock2path.d\fR(4), \fBattributes\fR(5)
 201 .sp
 202 .LP
 203 \fINetwork Interface Guide\fR