Click here to Skip to main content
15,903,385 members
Home / Discussions / C#
   

C#

 
GeneralRe: preventing header in xml file Pin
Yustme15-Jun-06 8:10
Yustme15-Jun-06 8:10 
GeneralRe: preventing header in xml file Pin
Dustin Metzgar15-Jun-06 8:28
Dustin Metzgar15-Jun-06 8:28 
GeneralRe: preventing header in xml file Pin
Yustme15-Jun-06 8:43
Yustme15-Jun-06 8:43 
GeneralRe: preventing header in xml file Pin
Dustin Metzgar15-Jun-06 8:59
Dustin Metzgar15-Jun-06 8:59 
GeneralRe: preventing header in xml file Pin
Yustme15-Jun-06 9:17
Yustme15-Jun-06 9:17 
QuestionEnumerating All computers on the Lan Pin
wasife15-Jun-06 5:40
wasife15-Jun-06 5:40 
AnswerRe: Enumerating All computers on the Lan Pin
Josh Smith15-Jun-06 5:47
Josh Smith15-Jun-06 5:47 
AnswerRe: Enumerating All computers on the Lan Pin
Alexander Wiseman15-Jun-06 6:11
Alexander Wiseman15-Jun-06 6:11 
I think what Josh said is good advice.

There is another way to attack the problem, if you're interested. You could send out ARP (Address Resolution Protocol) requests to IPs on the whole network and see what responses you get. An ARP request is broadcasted to the whole network and it basically asks the question: "Who has IP address www.xxx.yyyy.zzz?". Each device on the network looks for such packets and will reply to the sender with its MAC address, which then allows the sender to associate an IP Address with a MAC address so that it knows how to get packets to that device.

For example, let us say that you are on a computer whose IP address on the LAN is 192.168.2.33. You want to know what other computers are out there, specifically on the subnet 192.168.2.x. Let us further say that there are three more machines on that subnet: 192.168.2.50, 192.168.2.67, and 192.168.2.4. Your computer sends out a whole slew of ARP requests, like this (this is what it might look like in a packet sniffer):
From: 192.168.2.33 BROADCAST --> who has 192.168.2.1 ?
From: 192.168.2.33 BROADCAST --> who has 192.168.2.2 ?
From: 192.168.2.33 BROADCAST --> who has 192.168.2.3 ?
From: 192.168.2.33 BROADCAST --> who has 192.168.2.4 ?
....
From: 192.168.2.33 BROADCAST --> who has 192.168.2.255 ?
Now when those three machines see their addresses asked for, they reply to your computer like so:
From: 192.168.2.50, To: 192.168.2.33 --> 192.168.2.50 is at [some MAC Address]
From: 192.168.2.67, To: 192.168.2.33 --> 192.168.2.67 is at [some MAC Address]
From: 192.168.2.4, To: 192.168.2.33 --> 192.168.2.4 is at [some MAC Address]
Now, when your computer picks those messages up, it knows how many computers are on the subnet 192.168.2.x and what their IP addresses are. From there to getting the computer names would not be hard.

This is just another idea, if you want a more low-level method of solving the problem. In order to send and receive packets from your application, doing a quick article search on CodeProject for "sending packets" or "receiving packets" should pull back some helpful results.

I hope this gives you some ideas; doubtless there are other ways of doing it, and perhaps more efficient than this one.

Sincerely,
Alexander Wiseman
GeneralRe: Enumerating All computers on the Lan Pin
Josh Smith15-Jun-06 7:58
Josh Smith15-Jun-06 7:58 
GeneralRe: Enumerating All computers on the Lan Pin
Alexander Wiseman15-Jun-06 8:50
Alexander Wiseman15-Jun-06 8:50 
QuestionUsing ifdef DEBUG Pin
MrEyes15-Jun-06 5:35
MrEyes15-Jun-06 5:35 
AnswerRe: Using ifdef DEBUG Pin
Josh Smith15-Jun-06 5:37
Josh Smith15-Jun-06 5:37 
GeneralRe: Using ifdef DEBUG [modified] Pin
MrEyes15-Jun-06 5:39
MrEyes15-Jun-06 5:39 
GeneralRe: Using ifdef DEBUG Pin
Alexander Wiseman15-Jun-06 5:41
Alexander Wiseman15-Jun-06 5:41 
GeneralRe: Using ifdef DEBUG Pin
Josh Smith15-Jun-06 5:42
Josh Smith15-Jun-06 5:42 
AnswerRe: Using ifdef DEBUG Pin
Alexander Wiseman15-Jun-06 5:39
Alexander Wiseman15-Jun-06 5:39 
QuestionDetect Dialup Connection (without WebRequest) Pin
Ariston Darmayuda15-Jun-06 5:01
Ariston Darmayuda15-Jun-06 5:01 
Questionhow to update graphic Pin
donkaiser15-Jun-06 4:52
donkaiser15-Jun-06 4:52 
AnswerRe: how to update graphic Pin
Guffa15-Jun-06 5:14
Guffa15-Jun-06 5:14 
GeneralRe: how to update graphic Pin
donkaiser15-Jun-06 5:29
donkaiser15-Jun-06 5:29 
GeneralRe: how to update graphic Pin
Josh Smith15-Jun-06 5:31
Josh Smith15-Jun-06 5:31 
GeneralRe: how to update graphic Pin
donkaiser15-Jun-06 5:51
donkaiser15-Jun-06 5:51 
GeneralRe: how to update graphic Pin
Josh Smith15-Jun-06 5:55
Josh Smith15-Jun-06 5:55 
AnswerRe: how to update graphic Pin
Guffa15-Jun-06 6:20
Guffa15-Jun-06 6:20 
QuestionExport Excel without Excel Pin
Seb.2615-Jun-06 4:11
Seb.2615-Jun-06 4:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.