You can write programs to run on a specific transport or transport type, or to operate on a system- 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 if it can, an application uses it. If the specified transport is inappropriate, the application automatically tries others with the right characteristics.
/etc/netconfig lists the transports available to the host and identifies them by type. NETPATH is optional and enables a user to specify a transport or selection of transports from the list in /etc/netconfig. By setting the NETPATH, the user specifies 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 they appear in that file.
For more details on network selection, refer to the Transport Interfaces Programming Guide or see the getnetconfig(3NSL) and netconfig(4) man pages.
RPC divides selectable transports into the following types.
Table 2-6 nettype Parameters
Value |
Meaning |
---|---|
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 |
|
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 uUser Datagram Protocol (UDP) |
|
Specifies Internet Transport Control Protocol (TCP) |