There's really two questions you seem to be confusing here. The first is "which IPs are valid within a range", and "which IPs are used by computers". The first question can be solved mathematically, but it won't tell you anything about your actual network. The second question can only be solved by sending a ping or ARP packet out for each address, and checking for a response. Whether a machine is disconnected or simply nonexistant really is the same thing as far as network is concerned, so there's no way (or reason) to differentiate between the two. If you want to know which addresses within a range of IPs have computers associated, ping each one. It's tedious, but it's the only way. You'll obvously only want to scan a small range of addresses, or you'll be at it for hours.
tylerl
Posts
-
How to get valid IPs from an IP Range? -
create setupWhat he's saying is that there's nothing magic about .NET executables and components. Just copy the .exe file and any .dll files out of the bin/Release or bin/Debug directory, zip them up, and send them to your friend.
-
Self-deleting hashtable entriesRun a clean-up function off a timer that scans the list for items older than 10 minutes, and deletes them. You'll have to keep track of how old an item is, of course. How you do that is really up to you, but I'd make the "value" portion of the table entry actually a class instance that holds your useful data plus a DateTime value.
-
DefaultValueAttributeIs it possible to change the DefaultValue attribute for a property for a derived class without having to re-define the whole property?
-
Container versus ScrollableI'm building something not entirely unlike the auto-resize C# Listbox [http://www.codeproject.com/cs/combobox/listbox.asp\], and am trying to decide where to start. That project based their control on the Panel in order to get things like scrolling for free. The undesirable side-effect is that the derived control is a container, and is treated like such in the designer. For example, you can drop controls into their listbox and the designer will assume that the listbox (being derived from a panel) should act as a container. So what's the workaround? Is it easier to (a) implement a scrollable view from scratch, or (b) modify a container control to no longer be treated as a container in the designer. Any pointers on doing either would be appreciated. I have read, by the way, a bit about implementing a derived designer class, but the existing literature doesn't go into enough detail to explain anything about a control being a container or not.