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