to get the mac address



hi all,
i want to know the logic to find the mac address of a system in which
we are working currently,by giving input as ip address.what functions
can be imported to do this,in C?

.