nutscan_cidr_to_ip(3)

nutscan_cidr_to_ip3

Convert a cidr ip to a range of ip address.

Usage

        #include <nut-scan.h>
        int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip);

Overview

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.

Releases

8 releases since Debian 7 (Wheezy); the text changed 5 times.

  1. 7
  2. 8
  3. 9–11
  4. 12
  5. 13
  6. Arch

From nut 2.8.5-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.