LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lp.SetBRC - Perform a SNMP SET on a single SNMP object of a host in a VLAN

LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.

Syntax

value,buffer=lp.SetBRC(ip,oid,vlanid);

Description

Perform a SNMP SET on a single SNMP object specified of the specified host IP address in the specified VLAN instance.

This function is used in Cisco VLAN architecture to query object of a specific MIB instance

Parameters

ip - This is a character string of the IP address x.x.x.x. This address should be imperatively defined in the LoriotPro directory and the RW community of the host should be set correctly.

oid - This is a character string of the SNMP oid to queryand a code for the data type. This OID should be imperatively defined in the LoriotPro MIB database (the MIB tree)

Oidname.index/(type)value

syntax Value type
(nu) NUL
(id) Object ID
(hs) Hexa string
(os) Octet string
(in) Integer
(ip) IP adresse
(co) Counter
(ga) Gauge
(ti) Timeticks

vlanid - The VLAN number

Return Values

value : A integer value if the snmp object is an integer a gauge or a counter. It returns 0 if the snmp object is an octet string.

Return nil if an error occurs

buffer : Return the result of the SNMP SET as a character string

Return nil if an error occurs

Example

See lp.Set function

 


www.loriotpro.com