Click here to Skip to main content
15,905,325 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
as mention in the subject,
im currently doing a project,
where i can list out all the active IP in the local area network,
the range of IP address is specified by user,
When the scanning is done,
it shows the results with hostname(xxx-pc) and domain(xx.inu.edu.my),
is there any method that allow me to keep the result that only show hostname(a machine)

to make things more clear,
the hostname and domain i mean here is similar to the answer mention in this article
http://superuser.com/questions/59093/difference-between-host-name-and-domain-name[^]

"domain part would reach you to the campus network
and the hostname would let you reach the exact machine in the campus."

in my list box result,
there are many domain "intimal.edu.my", "newinti.edu.my"
and many of them occupy an IP address, thus when i scan the network, it appear in the result.

What i want is to get a list of active IP that occupied by a machine, not domain.


For you info, i'm referring the code from this article Implement a basic IP Scanner for a local LAN in C#[^]
(click below link to view the screen shot)

Screenshot reference:
https://lh4.googleusercontent.com/-R-yBiHVKRF8/UCn_eeSEVCI/AAAAAAAAANo/wnevukhnpqY/s287/Fullscreen+capture+1482012+33338+PM.bmp.jpg[^]
Posted
Updated 13-Aug-12 23:27pm
v3
Comments
dan!sh 14-Aug-12 4:42am    
Could you post some code how you are getting this data?
asdf9009 14-Aug-12 4:44am    
sure...please give me a few minutes
asdf9009 14-Aug-12 4:45am    
im using the code from this article , and get the data~
Zoltán Zörgő 14-Aug-12 5:13am    
Your topic title and text confuse me a little bit. You want to show only the host names that are not fully qualified in your domain? Or only that are qualified? IP reservation is a totally other topic related to DHCP... so please clarify what you want to see as result after the "filtering" you want to do...
asdf9009 14-Aug-12 5:28am    
i had just improve the question , please check it again.
Sorry for my poor English if i make you confuse.

Check this[^] SO thread. I guess this is what you are trying to do.
 
Share this answer
 
I suppose I already gave you an answer here: How to scan a range of IP address and list all the active PCs with IP address and MAC[^], but you have not accepted it :(.
You should use my address enumerator and the ping and dns lookup from the solution suggested by d@nish.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900