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_pdu_create.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_pdu_create.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_pdu_create.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_pdu_create.html on line 8
Create an SNMP Protocol Data Unit message structure
#include <sys/types.h>
#include <netinet/in.h>
#include <snmp/snmp.h>
#include <snmp/asn1.h>
#include <snmp/snmp_api.h>
#include <snmp/snmp_client.h>
extern int snmp_errno;
struct snmp_pdu * snmp_pdu_create (int command );
- command
- The type of message that the PDU represents:
- BULK_REQ_MSG
- GET_REQ_MSG
- GET_RSP_MSG
- GETNEXT_REQ_MSG
- INFORM_REQ_MSG
- SET_REQ_MSG
- TRP_REQ_MSG
- TRP2_REQ_MSG
as defined in <snmp/snmp.h>.
libsnmp
Use the -l snmp option to
qcc
to link against this library.
The snmp_pdu_create() function allocates memory for a Protocol Data Unit
(PDU) structure
for SNMP message passing.
The PDU structure is
initialized with default values; see the documentation for
snmp_pdu.
A pointer to the PDU structure created, or NULL if an error
occurs (snmp_errno is set).
If an error occurs, this function sets snmp_errno to:
- SNMPERR_GENERR
- Not enough memory to create the snmp_pdu structure.
SNMP
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
snmp_free_pdu(),
snmp_pdu,
snmp_read(),
snmp_send()
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_pdu_create.html on line 182
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_pdu_create.html on line 182