Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/snmp_open.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/snmp_open.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/snmp_open.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/snmp_open.html on line 8

snmp_open()

Open an SNMP session

Synopsis:

#include <sys/types.h>
#include <snmp/asn1.h>
#include <snmp/snmp_api.h>

extern int snmp_errno;

struct snmp_session * snmp_open(
            struct snmp_session * session );

Arguments:

session
A pointer to a snmp_session structure that defines the SNMP session that you want to open.

Library:

libsnmp

Use the -l snmp option to qcc to link against this library.

Description:

The snmp_open() function sets up an SNMP session with the information supplied by the application in the snmp_session structure pointed to by session. Next, snmp_open() opens and binds the necessary UDP port.

Returns:

A pointer to a snmp_session structure for the created session (which is different from the pointer passed to the function), or NULL if an error occurs (snmp_errno is set).

Errors:

If an error occurs, this function sets snmp_errno to one of:

SNMPERR_BAD_ADDRESS
Unknown host.
SNMPERR_BAD_LOCPORT
Couldn't bind to the specified port.
SNMPERR_GENERR
Couldn't open the socket.

Classification:

SNMP

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread No

See also:

read_main_config_file(), select(), snmp_close(), snmp_free_pdu(), snmp_pdu, snmp_pdu_create(), snmp_read(), snmp_select_info(), snmp_send(), snmp_session, snmp_timeout()

Based on RFC 1157, FAQ in Internet newsgroup comp.protocols.snmp

Marshall T. Rose, The Simple Book: An Introduction to Internet Management, Revised 2nd ed. (Prentice-Hall, 1996, ISBN 0-13-451659-1)


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/snmp_open.html on line 164

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/snmp_open.html on line 164