Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

nutscan_cidr_to_ip(3) [debian man page]

NUTSCAN_CIDR_TO_IP(3)						    NUT Manual						     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 paramters in the scanning functions of the libnutscan API. It is the caller's responsability to free start_ip and stop_ip strings. RETURN VALUE
The nutscan_cidr_to_ip() function returns 0 if an error occured (invalid cidr address) or 1 if successful. 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_display_parsable(3), nutscan_display_ups_conf(3) Network UPS Tools 05/22/2012 NUTSCAN_CIDR_TO_IP(3)

Check Out this Related Man Page

NUTSCAN_SCAN_NUT(3)						    NUT Manual						       NUTSCAN_SCAN_NUT(3)

NAME
nutscan_scan_nut - Scan network for available NUT services. SYNOPSIS
#include <nut-scan.h> nutscan_device_t * nutscan_scan_nut(const char * startIP, const char * stopIP, const char * port, long usec_timeout); DESCRIPTION
The nutscan_scan_nut() function try to detect available NUT services and their associated devices. It issues a NUT request on every IP ranging from startIP to stopIP. startIP is mandatory, stopIP is optional. Those IP may be either IPv4 or IPv6 addresses or host names. You MUST call nutscan_init(3) before using this function. A specific port number may be passed, or NULL to use the default NUT port. This function waits up to usec_timeout microseconds before considering an IP address does not respond to NUT queries. RETURN VALUE
The nutscan_scan_nut() function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found. SEE ALSO
nutscan_init(3), nutscan_scan_usb(3), nutscan_scan_xml_http(3), nutscan_scan_snmp(3), nutscan_scan_avahi(3), nutscan_scan_ipmi(3), nutscan_display_ups_conf(3), nutscan_display_parsable(3), nutscan_new_device(3), nutscan_free_device(3), nutscan_add_option_to_device(3), nutscan_add_device_to_device(3), nutscan_cidr_to_ip(3) Network UPS Tools 05/22/2012 NUTSCAN_SCAN_NUT(3)
Man Page

4 More Discussions You Might Find Interesting

1. Cybersecurity

Restricting Telnet to IPs

Dear Experts, Is there a way to restrict telnet to specific IPs Thanks (6 Replies)
Discussion started by: geraldwilson
6 Replies

2. Programming

How to parse IP range in CIDR format in C

Hello everybody, I'm coding a network program and i need it to "understand" ip ranges, but i don't know how to make to parse an IP CIDR range, let's say "172.16.10.0/24" to work with the specified IP range. I've found a program which does it, but i don't understand the code. Here is the... (3 Replies)
Discussion started by: semash!
3 Replies

3. Linux

Regex for plucking out IPs and CIDRs from text file?

Hello to the unix.com community. I have a mess of text. What I would like to do I pluck out IP addresses and CIDR notations only. I thought I would try something like this /usr/bin/grep -o '\{1,3\}\.\{1,3\}\.\{1,3\}\.\{1,3\}\\' /Path/To/File But there are a few problems wit this. ... (3 Replies)
Discussion started by: TroubleNow345
3 Replies

4. Shell Programming and Scripting

Convert ip ranges to CIDR netblocks

Hi, Recently I had to convert a 280K lines of ip ranges to the CIDR notation and generate a file to be used by ipset (netfilter) for ip filtering. Input file: 000.000.000.000 - 000.255.255.255 , 000 , invalid ip 001.000.064.000 - 001.000.127.255 , 000 , XXXXX 001.000.245.123 -... (10 Replies)
Discussion started by: ripat
10 Replies