Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I gotto make a mac filtering module.For this i need to fetch the mac/ip addresses of the incoming request packets(WLAN).I have to program this in windows.Can anyone please suggest me how to go about?

The understanding that i gained through research says to fetch the mac address from the miniport driver,is there a way to get it directly from application level??

Please help!

Thanks in advance.
Posted

1 solution

There is no reliable way of doing this at the application level. Ip is on level 3, and MAC is on level 2. Level 2 is implemented in the driver (or in the firmware)). Even if you succeed in getting the MAC address at session establishment, there is no guarantee that this is the mac address of the client. (routers, bridges will substitute their MAC Address).
Your best bet is to build a filter driver. Alternatively, use WMI to query the arp table.
About IP addresses: on most home networks nowadays, PC's will talk to each other using IPV6 ( the whole media stack in windows 7 uses IPV6 by default) so be prepared that your ip adresses may not look familiar.

Tell us some more on what you're attempting to do. Is this a filter for one particular application? In that case, if the particular app only binds to IPV4, you should have no trouble. If you're building some kind of firewall, filter drivers are the way to...
 
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