File: nutscan_cidr_to_ip.txt

package info (click to toggle)
nut 2.8.1-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 18,284 kB
  • sloc: ansic: 108,785; sh: 9,370; cpp: 3,370; makefile: 2,842; python: 1,029; perl: 763; xml: 47
file content (44 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
NUTSCAN_CIDR_TO_IP(3)
=====================

NAME
----

nutscan_cidr_to_ip - Convert a CIDR IP to a range of IP address.

SYNOPSIS
--------

 #include <nut-scan.h>

 int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip);

DESCRIPTION
-----------

The *nutscan_cidr_to_ip()* function converts a range of IP address in
the CIDR format given as a string in 'cidr', to two IPs in strings
pointed by 'start_ip' and 'stop_ip' which can be used as input
parameters in the scanning functions of the libnutscan API.

It is the caller's responsibility to free 'start_ip' and 'stop_ip' strings.

RETURN VALUE
------------

The *nutscan_cidr_to_ip()* function returns 0 if an error occurred
(invalid 'cidr' address) or 1 if successful.

NOTES
-----

Technically, the function is currently defined in 'nutscan-ip.h' file.

SEE ALSO
--------

linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3],
linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3],
linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3],
linkman:nutscan_display_ups_conf_with_sanity_check[3],
linkman:nutscan_display_parsable[3], linkman:nutscan_display_ups_conf[3]