'\" te .\" Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. .TH soconfig 1M "3 May 2012" "SunOS 5.11" "System Administration Commands" .SH NAME soconfig \- configure transport providers for use by sockets .SH SYNOPSIS .LP .nf \fB/usr/sbin/soconfig\fR \fB-d\fR \fIdir\fR .fi .LP .nf \fB/usr/sbin/soconfig\fR \fB-f\fR \fIfile\fR .fi .LP .nf \fB/usr/sbin/soconfig\fR \fB-F\fR \fIname\fR [[\fB-h\fR \fIhint\fR] [\fB-m\fR \fImodname\fR] \fB-t\fR \fIfamily\fR:\fItype\fR:\fIprotocol\fR[,...]] .fi .LP .nf \fB/usr/sbin/soconfig\fR \fIfamily\fR \fItype\fR \fIprotocol\fR [\fImodule\fR | \fIpath\fR] .fi .LP .nf \fB/usr/sbin/soconfig\fR \fB-l\fR [\fB-np\fR] .fi .SH DESCRIPTION .sp .LP The \fBsoconfig\fR utility configures the transport provider driver for use with sockets. It specifies how the family, type, and protocol parameters in the \fBsocket\fR(3SOCKET) call are mapped to the name of a transport provider such as \fB/dev/tcp\fR. This utility can be used to add an additional mapping or remove a previous mapping. .sp .LP The \fBsoconfig\fR utility is also used to configure socket filters. .sp .LP The \fBinit\fR(1M) utility uses \fBsoconfig\fR with the \fBsock2path.d\fR(4) file during the booting sequence. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-d\fR \fIdir\fR\fR .ad .sp .6 .RS 4n Set up the \fBsoconfig\fR configuration for each driver according to the information stored in the files in \fIdir\fR. .RE .sp .ne 2 .mk .na \fB\fB-f\fR \fIfile\fR\fR .ad .sp .6 .RS 4n Set up the \fBsoconfig\fR configuration for each driver according to the information stored in \fIfile\fR. A \fBsoconfig\fR file consists of lines of at least the first three fields listed below, separated by spaces: .sp \fIfamily type protocol\fR [\fImodule\fR | \fIpath\fR] .sp These fields are described in the \fBOPERANDS\fR section below. .sp An example of \fIfile\fR can be found in the \fBEXAMPLES\fR section below. .RE .sp .ne 2 .mk .na \fB\fB-F\fR \fIname\fR [[\fB-h\fR \fIhint\fR] [\fB-m\fR \fImodname\fR] \fB-t\fR \fIfamily\fR:\fItype\fR:\fIprotocol\fR[,...]]\fR .ad .sp .6 .RS 4n Update socket filter configuration. If only the \fIname\fR is specified, then the filter is unconfigured. Otherwise, the filter will be configured. .sp The following are options associated with the \fB-F\fR option. .sp .ne 2 .mk .na \fB\fB-h\fR \fIhint\fR\fR .ad .sp .6 .RS 4n Placement hint for the filter. If the placement cannot be satisfied, then the configuration request will fail. The hint can be one of the following: .sp .ne 2 .mk .na \fB\fBtop\fR\fR .ad .sp .6 .RS 4n The filter should be placed on top, closest to the socket. .RE .sp .ne 2 .mk .na \fB\fBbottom\fR\fR .ad .sp .6 .RS 4n The filter should be placed on the bottom, closest to the protocol. .RE .sp .ne 2 .mk .na \fB\fBabove\fR:\fIname\fR\fR .ad .sp .6 .RS 4n The filter should be placed above the filter specified by \fIname\fR. The filter will lie closer to the socket than \fIname\fR. .RE .sp .ne 2 .mk .na \fB\fBbelow\fR:\fIname\fR\fR .ad .sp .6 .RS 4n The filter should be placed below the filter specified by \fIname\fR. The filter will lie closer to the socket than \fIname\fR. .RE .RE .sp .ne 2 .mk .na \fB\fB-m\fR \fImodname\fR\fR .ad .sp .6 .RS 4n Name of the filter module. The module must be located in the \fBsocketmod\fR namespace. If unspecified, then the module name is expected to be the same as the filter name. .RE .sp .ne 2 .mk .na \fB\fB-t\fR \fIfamily\fR:\fItype\fR:\fIprotocol\fR[,...]\fR .ad .sp .6 .RS 4n Socket tuple for the filter. The fields making up the tuple are described in the \fBOPERANDS\fR section. The configuration will fail if any of the socket tuples refer to a socket that uses a transport provider that does not support socket filters. STREAMS-based transport providers are not supported by socket filters. .RE .RE .sp .ne 2 .mk .na \fB\fB-l\fR [\fB-np\fR]\fR .ad .sp .6 .RS 4n Dump the in-kernel socket configuration table. This option has the following suboptions: .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .sp .6 .RS 4n Do not convert socket family, type, and protocol to string representation. .RE .sp .ne 2 .mk .na \fB\fB-p\fR\fR .ad .sp .6 .RS 4n Display machine-parseable output. .RE .RE .SH OPERANDS .sp .LP The following operands are supported: .sp .ne 2 .mk .na \fB\fIfamily\fR\fR .ad .sp .6 .RS 4n The protocol family as listed in the \fB/usr/include/sys/socket.h\fR file, expressed as an integer. This file is contained in the \fBsystem/header\fR package, which might not be part of your Solaris distribution. .RE .sp .ne 2 .mk .na \fB\fItype\fR\fR .ad .sp .6 .RS 4n The socket type as listed in the \fB/usr/include/sys/socket.h\fR file, expressed as an integer. This file is contained in the \fBsystem/header\fR package, which might not be part of your Solaris distribution. .RE .sp .ne 2 .mk .na \fB\fIprotocol\fR\fR .ad .sp .6 .RS 4n The protocol number as specified in the family-specific \fBinclude\fR file, expressed as an integer. For example, for \fBAF_INET\fR this number is specified in \fB/usr/include/netinet/in.h\fR. An unspecified protocol number is denoted with the value zero. .RE .sp .ne 2 .mk .na \fB\fImodule\fR | \fIpath\fR\fR .ad .sp .6 .RS 4n The module name or path name of a device that corresponds to the transport provider, such as \fBtcp\fR or \fB/dev/tcp\fR. Modules must reside in \fBkernel/socketmod\fR. A device name must begin with \fB/dev\fR. If this parameter is specified, the configuration will be added for the specified family, type, and protocol. If this parameter is not specified, the configuration will be removed. .RE .SH EXAMPLES .LP \fBExample 1 \fRSetting Up a Module .sp .LP The following example sets up a module for family \fBAF_INET\fR and type \fBSOCK_STREAM\fR: .sp .in +2 .nf example# \fBsoconfig 2 2 0 tcp\fR .fi .in -2 .sp .sp .LP The following example sets up \fB/dev/tcp\fR for family \fBAF_INET\fR and type \fBSOCK_STREAM\fR: .sp .in +2 .nf example# \fBsoconfig 2 2 0 /dev/tcp\fR .fi .in -2 .sp .sp .LP The following is a sample file used with the \fB-f\fR option. Comment lines begin with a hash mark (\fB#\fR): .sp .in +2 .nf # Family Type Protocol Module | Path 2 2 0 tcp 2 2 6 tcp 2 1 0 udp 2 1 17 udp 1 2 0 /dev/ticotsord 1 1 0 /dev/ticlts 2 4 0 icmp .fi .in -2 .sp .LP \fBExample 2 \fRConfiguring a Socket Filter .sp .LP The following command configures a socket filter, \fBfoo\fR, which has the loadable module named \fBfoomod\fR. The filter will automatically be attached to all \fBAF_INET\fR TCP sockets. .sp .in +2 .nf example# \fBsoconfig -F foo -m foomod -t 2:2:0,2:2:6\fR .fi .in -2 .sp .sp .LP The following command unconfigures the filter \fBfoo\fR. .sp .in +2 .nf example# \fBsoconfig -F foo\fR .fi .in -2 .sp .SH FILES .sp .ne 2 .mk .na \fB\fB/etc/sock2path.d\fR\fR .ad .sp .6 .RS 4n Directory containing files with mappings from sockets to transport providers. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os .TE .SH SEE ALSO .sp .LP \fBinit\fR(1M), \fBsock2path.d\fR(4), \fBattributes\fR(5) .sp .LP \fIOracle Solaris 11.2 Programming Interfaces Guide\fR