In Oracle Solaris, several transport layer protocols, for example, SCTP, TCP, and UDP, provide services to application layer protocols. By default, these protocols typically do not require any additional configuration. However, you might need to explicitly configure certain application layer services to use certain network protocols. Some examples include the echo and discard applications.
The following procedure describes the basic steps for adding inet services (those controlled by the inetd daemon) for a transport layer protocol to the SMF repository. For more information about modifying services that are controlled by inetd, see Modifying Services that are Controlled by inetd in Managing System Services in Oracle Solaris 11.3.
For example purposes only, the procedure describes how to add a new SCTP echo service by using the manifest echo.xml (/lib/svc/manifest/network/echo.xml). However, you can use the same basic procedure to add different services that run over other transport layer protocols, for example, TCP and UDP.
Before You Begin
Prior to performing this procedure, confirm that the service you want to add is controlled by the inetd daemon. For example, the output of the following command shows that the echo service, which is used in this procedure's examples, is controlled by inetd:
$ inetadm . . . disabled disabled svc:/network/echo:dgram disabled disabled svc:/network/echo:stream . . .
See the pfedit(1M) man page.
Use the following syntax for the service definition:
service-name port/protocol aliases
$ svcs -l service-name
For example, you would locate the manifest for the echo service as follows:
$ svcs -l echo fmri svc:/network/echo:stream name echo enabled false state disabled next_state none state_time Thu Dec 3 08:11:11 2015 restarter svc:/network/inetd:default manifest /etc/svc/profile/generic.xml manifest /lib/svc/manifest/network/echo.xml fmri svc:/network/echo:dgram name echo enabled false state disabled next_state none state_time Thu Dec 3 08:11:10 2015 restarter svc:/network/inetd:default manifest /etc/svc/profile/generic.xml manifest /lib/svc/manifest/network/echo.xml
For example, /lib/svc/manifest/network/echo.xml is where the echo service manifest is located.
# cd /lib/svc/manifest/network
For this particular example, you could use either the dgram or stream element.
In this example, the value of the proto property is changed to sctp.
For example, you would add a new sctp_stream instance as follows:
<service name='network/echo' version='1' type='service'> <instance name='stream' enabled='false'/> <instance name='dgram' enabled='false'/> <instance name='sctp_stream' enabled='false'/> </service>
$ svcadm restart manifest-import
$ svcs FMRI
For the FMRI argument, use the Fault Managed Resource Identifier (FMRI) of the service manifest for example, the echo service's FMRI:
$ svcs echo
Or, you can use the inetadm command the display similar information:
$ inetadm -l echo
$ inetadm -l echo:sctp_stream SCOPE NAME=VALUE name="echo" endpoint_type="stream" proto="sctp" isrpc=FALSE wait=FALSE exec="/usr/lib/inet/in.echod -s" user="root" default bind_addr="" default bind_fail_max=-1 default bind_fail_interval=-1 default max_con_rate=-1 default max_copies=-1 default con_rate_offline=-1 default failrate_cnt=40 default failrate_interval=60 default inherit_env=TRUE default tcp_trace=FALSE default tcp_wrappers=FALSE default connection_backlog=10 default tcp_keepalive=FALSE
# inetadm -e FMRI
For example, you would enable the echo service as follows:
$ inetadm -e svc:/network/echo:sctp_stream $ svcs echo
Or, use the inetadm command as follows:
$ inetadm | grep echo