-
May 7th, 2009, 01:25 AM
#1
MAC filtering
Hi all, im working on a security product and i need to know how to make a prog that will allow me to filter out MAC addresses. I was hoping someone here would point me in the right direction. I do it all the time on my router, i'd just like to know if there is some way to tell the MAC address of a connected machine. Suppose i have a UDP program that binded to a port which another TCP program connected to, i'd like to find out what that MAC address is of the machine connected. Any help on this is greatly appreciated, google isnt helping much. Thanx in advance!
-
May 7th, 2009, 03:05 AM
#2
Re: MAC filtering
if you type into a console window when everything is connected, do you get the information that you want?
-
May 7th, 2009, 09:53 AM
#3
Re: MAC filtering
No i get
Code:
No ARP Entries Found
-
May 8th, 2009, 01:00 AM
#4
Re: MAC filtering
I've got no idea then. I'm not certain, but I don't think you're guaranteed that information from what you have said.
-
May 8th, 2009, 08:18 AM
#5
Re: MAC filtering
Amleto is correct - this is exactly what ARP is designed for. If you use a network analyser like Wireshark then you can see this in action. When your computer wants to connect to a computer with IP address 10.0.0.4 then you'll see it broadcast an ARP request "who has IP 10.0.0.4"? The computer with address 10.0.0.4 will then respond so that your computer now knows the MAC address to send the answer to.
Please note that this only works for local network nodes. You cannot get the MAC addresses of computers on the other side of a router or firewall, like servers on the Internet for example.
-
May 8th, 2009, 10:03 AM
#6
Re: MAC filtering
Im familiar with Address Resolution Protocol. I just needed to find a way to copy cat a wireless routers MAC filtering function. Also "arp -a" didnt return anything the first time, but it did once i rebooted my machine. Where would i start to run the command and some how 'read' the output with out the use of fstream?
-
May 8th, 2009, 11:55 AM
#7
Re: MAC filtering
if only fstream is prohibited, you could still arp -a, save results to file, then read the file using C style fscanf. why can't you use fstream? I dont know how to do it more directly, sorry.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|