WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %SS_GETSERVBYNAME(service, [type], port, protocol)
Returns SS_SUCCESS (0) or one of the errors in Error codes returned by %SS_GETSERVBYNAME below. (n)
The service name for which to return a port number. (a)
(optional) One of the following types of protocols to access the service: (a)
tcp = Transmission control protocol.
udp = User datagram protocol.
Returned with the port number for the specified service. (n)
Returned with the name of the network protocol for the specified service. (a)
%SS_GETSERVBYNAME gets the port and network protocol from the services file for the specified service name (and optional protocol type). This file is the TCP/IP services file on Windows; the /etc/services file on UNIX; and sys$system:tcpip$services.dat on OpenVMS. (On OpenVMS, this is not a text file that you can edit directly as is the case on Windows and UNIX; rather it’s a binary file, which can be edited with sys$manager:tcpip$config.com.)
If type is not specified, the first match is returned, and protocol will be either “tcp” or “udp.”
If SS_ENULL is returned, the system error code can be returned by immediately calling %SYSERR.
See the Socket Errors table for additional information about these errors.
The example below returns the port and protocol for the vtxnet service.
status = %ss_getservbyname("vtxnet",, port, proto)