soconfig - configure transport providers for use by sockets
/usr/sbin/soconfig -d dir
/usr/sbin/soconfig -f file
/usr/sbin/soconfig -F name [[-h hint] [-m modname] -t family:type:protocol[,...]]
/usr/sbin/soconfig family type protocol [module | path]
/usr/sbin/soconfig -l [-np]
The soconfig utility configures the transport provider driver for use with sockets. It specifies how the family, type, and protocol parameters in the socket(3SOCKET) call are mapped to the name of a transport provider such as /dev/tcp. This utility can be used to add an additional mapping or remove a previous mapping.
The soconfig utility is also used to configure socket filters.
The following options are supported:
Set up the soconfig configuration for each driver according to the information stored in the files in dir.
Set up the soconfig configuration for each driver according to the information stored in file. A soconfig file consists of lines of at least the first three fields listed below, separated by spaces:
family type protocol [module | path]
These fields are described in the OPERANDS section below.
An example of file can be found in the EXAMPLES section below.
Update socket filter configuration. If only the name is specified, then the filter is unconfigured. Otherwise, the filter will be configured.
The following are options associated with the –F option.
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:
The filter should be placed on top, closest to the socket.
The filter should be placed on the bottom, closest to the protocol.
The filter should be placed above the filter specified by name. The filter will lie closer to the socket than name.
The filter should be placed below the filter specified by name. The filter will lie closer to the socket than name.
Name of the filter module. The module must be located in the socketmod namespace. If unspecified, then the module name is expected to be the same as the filter name.
Socket tuple for the filter. The fields making up the tuple are described in the OPERANDS 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.
Dump the in-kernel socket configuration table. This option has the following suboptions:
Do not convert socket family, type, and protocol to string representation.
Display machine-parseable output.
The following operands are supported:
The protocol family as listed in the /usr/include/sys/socket.h file, expressed as an integer. This file is contained in the system/header package, which might not be part of your Solaris distribution.
The socket type as listed in the /usr/include/sys/socket.h file, expressed as an integer. This file is contained in the system/header package, which might not be part of your Solaris distribution.
The protocol number as specified in the family-specific include file, expressed as an integer. For example, for AF_INET this number is specified in /usr/include/netinet/in.h. An unspecified protocol number is denoted with the value zero.
The module name or path name of a device that corresponds to the transport provider, such as tcp or /dev/tcp. Modules must reside in kernel/socketmod. A device name must begin with /dev. 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.
The following example sets up a module for family AF_INET and type SOCK_STREAM:
example# soconfig 2 2 0 tcp
The following example sets up /dev/tcp for family AF_INET and type SOCK_STREAM:
example# soconfig 2 2 0 /dev/tcp
The following is a sample file used with the –f option. Comment lines begin with a hash mark (#):
# 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 icmpExample 2 Configuring a Socket Filter
The following command configures a socket filter, foo, which has the loadable module named foomod. The filter will automatically be attached to all AF_INET TCP sockets.
example# soconfig -F foo -m foomod -t 2:2:0,2:2:6
The following command unconfigures the filter foo.
example# soconfig -F foo
Directory containing files with mappings from sockets to transport providers.
See attributes(5) for descriptions of the following attributes:
Oracle Solaris 11.2 Programming Interfaces Guide