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.GetFirstRouter - Get the first router from the LoriotPro directory

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

router_id = lp.GetFirstRouter();

Description

Read the directory and find the first router ID. A router ID is one of its IP address. This function is useful to search for routers in the directory.

Parameters

nothing

Return Values

Nil if no router found

router_id - The router ID in a IP address format

Remark

This is not the first visible router object that is returned but the first router object loaded in memory

Example


lp_value = 0;
lp_buffer ="error";
router_id=lp.GetFirstRouter();
if router_id~=nil then
lp.Trace(router_id);
lp_buffer="ok";
end



www.loriotpro.com