Go to main content

ONC+ RPC Developer's Guide

Exit Print View

Updated: March 2019

Network Selection in TI-RPC

You can write programs to run on a specific transport or transport type, or to operate on a system-chosen or user-chosen transport. Two mechanisms for network selection are the /etc/netconfig database and the environmental variable NETPATH. These mechanisms enable a fine degree of control over network selection – a user can specify a preferred transport and an application will use it if it can. If the specified transport is inappropriate, the application automatically tries other transports with the right characteristics.

/etc/netconfig lists the transports available to the host and identifies them by type. NETPATH is optional and enables you to specify a transport or selection of transports from the list in /etc/netconfig. By setting the NETPATH, you specify the order in which the application tries the available transports. If NETPATH is not set, the system defaults to all visible transports specified in /etc/netconfig, in the order that they appear in that file.

For more details on network selection, see the getnetconfig(3NSL) and netconfig(4) man pages.

RPC divides selectable transports into the types described in the following table.

Table 6  nettype Parameters in TI-RPC
Same as selecting netpath.
Uses the transports chosen with the visible flag ('v') set in their /etc/netconfig entries.
Same as visible, but restricted to connection-oriented transports. Transports are selected in the order listed in /etc/netconfig.
Same as visible, but restricted to connectionless transports.
Same as visible, but restricted to connectionless transports.
Uses the connection-oriented transports chosen in the order defined in NETPATH.
Uses the connectionless transports chosen in the order defined in NETPATH.
Specifies Internet User Datagram Protocol (UDP).
Specifies Internet Transport Control Protocol (TCP).