nutscan_cidr_to_ip - Man Page

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(3) the 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

nutscan_scan_usb(3), nutscan_scan_xml_http_range(3), nutscan_scan_nut(3), nutscan_scan_avahi(3), nutscan_scan_ipmi(3), nutscan_scan_snmp(3), nutscan_display_ups_conf_with_sanity_check(3), nutscan_display_parsable(3), nutscan_display_ups_conf(3)

Referenced By

nutscan(3), nutscan_add_ip_range(3), nutscan_display_parsable(3), nutscan_display_sanity_check(3), nutscan_display_sanity_check_serial(3), nutscan_display_ups_conf(3), nutscan_display_ups_conf_with_sanity_check(3), nutscan_free_ip_ranges(3), nutscan_init_ip_ranges(3), nutscan_ip_ranges_iter_inc(3), nutscan_ip_ranges_iter_init(3), nutscan_scan_avahi(3), nutscan_scan_ipmi(3), nutscan_scan_nut(3), nutscan_scan_nut_simulation(3), nutscan_scan_snmp(3), nutscan_scan_xml_http_range(3), nutscan_stringify_ip_ranges(3).

04/22/2025 Network UPS Tools 2.8.3 NUT Manual