![]() |
![]() |
![]() |
![]() |
![]() |
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Structure that describes an SNMP Protocol Data Unit (transaction)
#include <snmp/snmp_api.h>
struct snmp_pdu {
int version;
ipaddr address;
oid * srcParty;
int srcPartyLen;
oid * dstParty;
int dstPartyLen;
oid * context;
int contextLen;
u_char * community;
int community_len;
int command;
long reqid;
long errstat;
long errindex;
/* Trap information */
oid * enterprise;
int enterprise_length;
ipaddr agent_addr;
int trap_type;
int specific_type;
u_long time;
struct variable_list * variables;
};
The snmp_pdu structure describes a Protocol Data Unit (PDU), a transaction that's performed over an open session. It contains the headers and variables of an SNMP packet. The structure includes the following members:
The variable_list structure is defined as:
typedef struct sockaddr_in ipaddr;
struct variable_list {
struct variable_list* next_variable;
oid* name;
int name_length;
u_char type;
union {
long* integer;
u_char* string;
oid* objid;
u_char* bitstring;
struct counter64* counter64;
} val;
int val_len;
};
The members are:
snmp_close(), snmp_free_pdu(), snmp_open(), snmp_pdu_create(), snmp_read(), snmp_send(), snmp_session
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)
![]() |
![]() |
![]() |
![]() |