Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
The DPIconnect_to_agent_UNIXstream() function z/OS Communications Server: IP Programmer's Guide and Reference SC27-3659-02 |
|
Format
Parameters
Return codes
UsageThe DPIconnect_to_agent_UNIXstream() function is used at the subagent side to set up an AF_UNIX connection to the DPI-capable SNMP agent. As part of the connection processing, the DPIconnect_to_agent_UNIXstream() function sends an SNMP GET request to the SNMP agent to retrieve the path name for the UNIX streams connection. By default, this SNMP GET request is sent to the well-known SNMP port 161. If the SNMP agent is listening on a port other than well-known port 161, the SNMP_PORT environment variable can be set to the port number of the SNMP agent prior to issuing the DPIconnect_to_agent_UNIXstream(). Use setenv() to override port 161 before using this function. The DPIconnect_to_agent_UNIXstream() function uses a path name in the z/OS UNIX file system as the name of the socket for the connect. This path name is available at the SNMP agent through the MIB object 1.3.6.1.4.1.2.2.1.1.3, which has the name dpiPathNameForUnixStream. The SNMP agent uses the default name /var/dpi_socket if you do not supply another name in the agent startup parameter (-s) or in the OSNMPD.DATA file. Whichever name is used, the SNMP agent creates the path name as a character special file during initialization. You must either define the subagents with superuser authority or set the read and write file access permission bits for the path name for the class associated with the user ID of the subagent before subagents can successfully connect to the agent using the path name. You can use the agent -C startup parameter to specify which permission bits should be set. To run a user-written subagent from a non-privileged user ID, set the permission bits for the character special file to write access. Otherwise, a subagent using this function must be run from a superuser or other user with appropriate privileges. Examples
|
Copyright IBM Corporation 1990, 2014
|