SNMP Manager Programmer's Guide
Reference Summary
SNMP Manager Programmer’s Guide–134249
9-25
Defines
Defines
Packet-Construction Functions
Initializing Packets
SNMP_Create_Request()
This function initializes a request packet for a Get, GetNext, or Set PDU. It dynamically 
allocates memory for a packet structure of type SNMP_PKT_T, assigns to it all request 
packet variables except variable bindings, and returns a pointer to the structure.  To 
associate variable bindings with the packet, use the functions defined later in this section 
under “Functions for Binding MIB Variables.” To deallocate memory used by a request 
packet you no longer need, use SNMP_Free(), described later in this section under 
“Function for Releasing Packet Memory.” 
Define Name Value
MAX_OID_COUNT 32
SNMP_MAX_PACKET_SIZE 1400  /* IPC maximum: 4096 */
SNMP_MIN_PACKET_SIZE 484
SNMP_REQUEST_PORT 161
SNMP_TRAP_PORT 162
SNMP_VERSION_1 0
packet = SNMP_Create_Request(pdu-type, 
 version, 
 community-length,
 community-identifier,
 request-id, 
 num-varbinds);
SNMP_PKT_T* SNMP_Create_Request(int pdu-type,
 int version,
 int community-length,
 char *community-
identifier,
 INT_32_t request-id,
 int num-varbinds);










