Range of Host IPs in the network

I am able to get the IP address and Subnet Mask programatically. Is there a way we could generate all addressable host IPs with these two information?

I am just trying to develop a simple Ping Sweep module for my application.


PS: I am using C# .NET 3.5.


Calculate the first and last host IP addresses and then iterate over them sequentially. The first IP address is (address & mask) + 1. The last is (address | ~mask) - 1.

So if the network is and the netmask is, the first eligible host IP is:

(address & mask) + 1
( & + 1 + 1

The last eligible host IP is:

(address | ~mask) - 1
( | ~( - 1
( | ( - 1 - 1

So the valid host addresses are through inclusive.

Need Your Help

Calibri font printed as Arial

reporting-services printing fonts ssrs-2008

I have a Report that uses the Calibri font. It is rendered fine in IE, however when I print the report (clicking on the Printer icon) the text comes out in Arial.

Esablishing if file exists on another domain using javascript

javascript html html5 http

I wish to test from javascript within my html page if the following files exist or not:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.