getsmuxEntrybyname or getsmuxEntrybyidentity Subroutine
Purpose
Retrieves SNMP multiplexing (SMUX) peer entries from the /etc/snmpd.peers file or the local snmpd.peers file.
Library
SNMP Library (libsnmp.a)
Syntax
Description
The getsmuxEntrybyname and getsmuxEntrybyidentity subroutines read the snmpd.peers file and retrieve information about the SMUX peer. The sample peers file is /etc/snmpd.peers. However, these subroutines can also retrieve the information from a copy of the file that is kept in the local directory. The snmpd.peers file contains entries for the SMUX peers defined for the network. Each SMUX peer entry should contain:
- The name of the SMUX peer.
- The SMUX peer object identifier.
- An optional password to be used on connection initiation. The default password is a null string.
- The optional priority to register the SMUX peer. The default priority is 0.
The getsmuxEntrybyname subroutine searches the file for the specified name. The getsmuxEntrybyidentity subroutine searches the file for the specified object identifier.
These subroutines are part of the SNMP Application Programming Interface in the TCP/IP facility.
Parameters
Item | Description |
---|---|
name | Points to a character string that names the SMUX peer. |
identity | Specifies the object identifier for a SMUX peer. |
Return Values
If either subroutine finds the specified SMUX entry, that subroutine returns a structure containing the entry. Otherwise, a null entry is returned.
Files
Item | Description |
---|---|
/etc/snmpd.peers | Contains the SMUX peer definitions for the network. |