smux_pdu(3N) smux_pdu(3N)
NAME
decode_SMUX_PDU, encode_SMUX_PDU, free_SNMP_SMUX_PDU -
Operations on SMUX PDUs.
SYNOPSIS
#include <snmp/snmp.h>
struct type_SNMP_SMUX__PDUs *decode_SMUX_PDU(packet, length)
char *packet; /* packet received */ long length; /*
packet's length */
short encode_SMUX_PDU(pdu_ptr) struct type_SMUX__PDUs
*pdu_ptr; /* pointer to the structure */
void free_SNMP_SMUX_pdu(pdu_ptr) struct type_SMUX__PDUs
*pdu_ptr;
void free_SMUX_SimpleOpen(open_ptr) SMUX_SimpleOpen
*open_ptr;
void free_SMUX_ClosePDU(close_ptr) SMUX_ClosePDU *close_ptr;
void free_SMUX_RReqPDU(rreq_ptr) SMUX_RReqPDU *rreq_ptr;
void free_SMUX_RRspPDU(rrsp_ptr) SMUX_RrspPDU *rrsp_ptr;
void free_SMUX_GetPDU(get_ptr) SMUX_Data_PDU *get_ptr;
void free_SMUX_SOutPDU(sout_ptr) SMUX_SOutPDU *sout_ptr;
void free_SMUX_TrapPDU(trap_ptr) SMUX_Trap_PDU *trap_ptr;
DESCRIPTION
decode_SMUX_PDU takes an SMUX PDU from the packet received and
parses the information into the library's internal PDU format,
including all VarBind instances. If this routine fails, it
returns NULL.
encode_SMUX_PDU creates an ASN.1 encoded SMUX PDU from the
SMUX PDU structure specified by pdu_ptr. ASN.1 encoding is
required for the transfer of an SMUX PDU from an agent to a
peer and vice versa. encode_SMUX_PDU traces down the
structure of VarBinds that have been added to the SMUX PDU and
builds the ASN.1 encoding of the SMUX PDU in the packlet
pointer of the SMUX PDU data structure specified by pdu_ptr.
When this ASN.1 encoding is complete, SMUX PDU processing is
Copyright 1994 Novell, Inc. Page 1
smux_pdu(3N) smux_pdu(3N)
complete, and the structure is ready to be transferred. If
successful, encode_SMUX_PDU returns 0; if unsuccessful, it
returns -1.
free_SNMP_SMUX_pdu frees all memory associated with the PDU
header data structure, including the actual packlet and all
the VarBindList structures that were linked to the PDU. To
accomplish this, free_SNMP_SMUX_pdu invokes one of the
following functions, depending on the the type of PDU that
pdu_ptr points to: free_SMUX_SimpleOpen, free_SMUX_ClosePDU,
free_SMUX_RReqPDU, free_SMUX_RRspPDU, free_SMUX_GetPDU,
free_SMUX_SOutPDU, or free_SMUX_TrapPDU.
SEE ALSO
snmp_pdu(3N), varbind(3N)
Copyright 1994 Novell, Inc. Page 2