Click here to Skip to main content
15,888,133 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i want the list of ip address who are connected to my wifi.

What I have tried:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Web;

namespace WindowsFormsApplication6
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_click(object sender, EventArgs e)
{
string computerName = System.Net.Dns.GetHostName();
System.Net.IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(computerName);
System.Net.IPAddress[] ipAddress = ipEntry.AddressList;

computerName = computerName + "|" + ipAddress[0].ToString();
listBox1.Items.Add(computerName);
listBox1.Items.Add(ipAddress);
}
}
}
Posted
Updated 16-Jun-16 19:08pm
Comments
Mohibur Rashid 17-Jun-16 1:05am    
We don't even know what type of wifi device you do use...

1 solution

That's not as simple as you might think: to actually get the list, you need to query the router, but exactly how you do that will differ from router to router.
There is another solution though: How to List all devices info on your WLAN /router Programmatically in C#[^] - it will be relatively slow, however.
 
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