i want to find the mac address using a C program in linux. how to do it?
相关问题
- Multiple sockets for clients to connect to
- Is shmid returned by shmget() unique across proces
- What is the best way to do a search in a large fil
- glDrawElements only draws half a quad
- how to get running process information in java?
There is a great library to manage ethernet. If You want go to low level stuff its certainly worth to learn. It's quite hard C API to learn.
Lib PCAP.
link to lib pcap sourceforge
Some sample code:
There's also nice "kernel functions wrapper" like library: DNET
which provides great functionality to use it on low level networking. (also getting MAC addresses).
DNET
There are UNIX & win ports for both libraries.
1 minute of searching throug google: (i haven't tested it myself, i'm working on a windows machine in the moment)