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