DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Developing SMUX peers for SNMP agents

Encoding and decoding PDUs

There are two routines which handle encoding and decoding operations on SMUX PDUs: encode_SMUX_PDU and decode_SMUX_PDU.

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 complete, and the structure is ready to be transferred. If successful, encode_SMUX_PDU returns 0, if unsuccessful, it returns -1.

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.


Next topic: Terminating foosmuxd's SMUX association
Previous topic: Get and set

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003