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.GetServiceInformation

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

protocol_name,protocol_description = lp.GetServicePluginInformation('port','type')

Description

This LUA function retrieves information from the file /config/port-numbers.txt about IP application port number.

Parameters

'port' : The port number of the IP application layer (socket = IP-address:port)

'type' : One of the port type below

- 01 - 00001 - ICMP
- 02 - 00010 - IGMP
- 06 - 00110 - TCP
- 17 - 10001 - UDP

Return Values

protocol_name : Abreviation for that protocol

protocol_description : Long description of the protocol

Example

protocol_name,protocol_description=lp.GetServiceInformation(80,6)
lp.Print("protocol_name :"..protocol_name.." \nprotocol_description :"..protocol_description);

Example of return:

protocol_name :http
protocol_description :World Wide Web HTTP



www.loriotpro.com