The section Modifying Services that are Controlled by inetd in Managing System Services in Oracle Solaris 11.4 includes steps for adding a new instance of an inetd based service.
The following procedure applies those steps to add an echo service to the SCTP protocol. This procedure can serve as a guide if you want to add other inetd services to transport layer protocols.
Before You Begin
Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.
$ inetadm . disabled disabled svc:/network/echo:dgram disabled disabled svc:/network/echo:stream .
$ 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<- location 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<- location
echo.xml contains two echo-related elements: dgram and stream. You can use either to create a copy of the echo element on the file.
For this example, the name is sctp_stream.
For this example, the value of the proto property is changed to sctp.
The revisions in the /lib/svc/manifest/echo.xml file are shown in bold:
<instance name='sctp_stream' enabled='false' > <exec_method type='method' name='inetd_start' exec='/usr/lib/inet/in.echod -d' timeout_seconds='0'> <method_context> <method_credential user='root' group='root' /> </method_context> </exec_method> . <property_group name='inetd' type='framework'> <propval name='endpoint_type' type='astring' value='dgram' /> <propval name='proto' type='astring' value='sctp' /> <propval name='wait' type='boolean' value='true' /> </property_group> </instance>
The addition is shown in bold:
<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 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
Use the format service-name port/protocol [aliases]. For example:
echo 30/sctp
$ inetadm -e svc:/network/echo:sctp_stream