LabIV Library API Functions

Device Network Library net.pl
getinfo( Device Name, Termserv IP, Termserv port, Command to be run ); Returns a scalar storing the result of running the specified command on a particular device. The library will only run the command once and save the output for future referance. Returns "-1" if there were errors connecting to the device.
connection_status( Device Name ); Returns the scalar value corresponding to the current connection status of the stated device. Possible values are:
  • Ethernet
  • Console
  • ethernet-timed-out
  • nopasswd
  • console in use
  • console timed-out
  • monitor
  • 0
  • undefined:(returned error)
Ethernet and Console both imply that the connection was/is established correctly. Any other value implies that a connection was not established.
disconnect(); Closes all open connections.
FTP Network Library ftp_net.pl
get_ftp_file( Server name or IP, LoginID, Login Passwd, Directory, File ); Connects to the ftp server on the specified server, logs in using the specified login id and password, changes to the specified directory and downloads the specified file to the working directory. While this is only used to get the hosts file in the current LabIV implementation, it can be used to retrieve any file.
Host File Library hosts.pl
parse_hosts_file( Host file path name ); Opens the hosts file at the given path name. The IP address is extracted into the array @ip and the device name is extracted into the array @name with corresponding keys into each.
search_by_name( your regexp ); Returns array of keys indexing found values in @name
Device Profile .pl

Cisco Systems, Inc. Internal Use Only

Managed by WAT Webmaster
Last Modified on June 15, 1999