NAME

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

SYNOPSIS

Note
Two NUT websites

This version of the page reflects NUT release v2.8.1 with codebase commited 4ba352d8f at 2023-10-31T21:46:20+01:00

Options, features and capabilities in current development (and future releases) are detailed on the main site and may differ from ones described here.

#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