[Previous] [Contents] [Index] [Next]

snmp_pdu_create()

Create an SNMP message structure

Synopsis:

#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>

struct snmp_pdu * snmp_pdu_create (int command );

Library:

snmp3r.lib, snmp3s.lib

Description:

The snmp_pdu_create() function allocates memory for a Protocol Data Unit (PDU) structure for SNMP message passing. The command argument specifies the type of message that the PDU represents:

as defined in <snmp/snmp.h>. The PDU structure is initialized with default values; see snmp_pdu in this chapter.

Returns:

A pointer to the PDU structure created, or NULL if an error occurs (snmp_errno is set).

Errors:

SNMPERR_GENERR
Not enough memory to create the snmp_pdu structure.

Classification:

SNMP

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

<snmp_api.h>, snmp_pdu

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)


[Previous] [Contents] [Index] [Next]