smux_free_tree Subroutine

Purpose

Frees the object tree when a smux tree is unregistered.

Library

SNMP Library (libsnmp.a)

Syntax

#include <isode/snmp/smux.h>

void smux_free_tree ( parent,  child)
char *parent;
char *child;

Description

The smux_free_tree subroutine frees elements in the Management Information Base (MIB) list within an SNMP multiplexing (SMUX) peer. If the SMUX peer implements the MIB list with the readobjects subroutine, a list of MIBs is created and maintained. These MIBs are kept in the object tree (OT) data structures.

Unlike the smux_register subroutine, the smux_free_tree subroutine frees the MIB elements even if the tree is unregistered by the snmpd daemon. This functionality is not performed by the smux_register routine because the OT list is created independently of registering a tree with the snmpd daemon. The unregistered objects should be removed as the user deems appropriate. Remove the unregistered objects if the smux peer is highly dynamic. If the peer registers and unregisters many trees, it might be reasonable to add and delete the OT MIB list on the fly. The smux_free_tree subroutine expects the parent of the MIB tree in the local OT list to delete unregistered objects.

This subroutine does not return values or error codes.

This subroutine is part of the SNMP Application Programming Interface in the TCP/IP facility.

Parameters

Item Description
parent Contains a character string holding the immediate parent of the tree to be deleted.
child Contains a character string holding the beginning of the tree to be deleted.

The character strings are names or dot notations representing object identifiers.