GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NUTSCAN_GET_SERIAL_PORTS_LIST (3)

.ds Aq ’

NAME

nutscan_get_serial_ports_list - Get a port list name from a range of port.

CONTENTS

SYNOPSIS

#include <nut-scan.h>

char ** nutscan_get_serial_ports_list(const char *ports_range);

DESCRIPTION

The nutscan_get_serial_ports_list() function returns a null terminated array of string generated from a port range. ports_range may be one of:

o

o a single character from 0 to 9 or a to z representing a serial communication port depending on the operating system. For instance "0" is converted to /dev/ttyS0 and /dev/ttyUSB0 on Linux; "1" is converted to COM1 on Windows; "c" is converted to /dev/ttyc on solaris...

o

o a range of character in the form "X-Y". For instance "0-1" will be converted to /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0 and /dev/ttyUSB1 on Linux; "1-3" will be converted to COM1, COM2 and COM3 on Windows; "a-c" will be converted to /dev/ttya, /dev/ttyb and /dev/ttyc on Solaris.

o

o a single port name (/dev/ttyS5, COM4...).

o

o a list of port names separated with comas : "/dev/ttyS0,/dev/ttyS2,/dev/ttyS4" or "COM1,COM3"...

The returned array can be used in a call to nutscan_scan_eaton_serial to get the serial device on a system.

RETURN VALUE

The nutscan_get_serial_ports_list() function returns NULL if an error occured (invalid port range) or a pointer to a nll terminated array of string on success.

SEE ALSO

nutscan_scan_usb(3), nutscan_scan_xml_http(3), nutscan_scan_nut(3), nutscan_scan_avahi(3), nutscan_scan_ipmi(3), nutscan_scan_snmp(3), nutscan_scan_eaton_serial(3), nutscan_display_parsable(3), nutscan_display_ups_conf(3)

Search for    or go to Top of page |  Section 3 |  Main Index


Network UPS Tools 2&.7&.3&. NUTSCAN_GET_SERIAL_P (3) 03/02/2016

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.