Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-19-2004, 10:34 AM   #1
LQ Newbie
Registered: Jun 2004
Location: IL
Posts: 24

Rep: Reputation: 15
mac address with pcap

Does anyone have experience on libpcap? I want to get my ethernet card's mac address, where I can get the information? any fucntion return this value? Thanks.

I know win32pcap can do above, but it seems Linux version can't
Old 07-19-2004, 11:39 AM   #2
Registered: Jun 2004
Location: Maine
Distribution: LFS Mint OS, LFS, CENTos,
Posts: 119

Rep: Reputation: 18
as root do a netstat -i to get your interface name and then a /sbin/ifconfig eth0 substituting your interface name with eth0, unless eth0 is your interface name . Your mac address should be spit out in the format of XX.XX.XX.XX, or whatever.

Old 07-19-2004, 11:57 AM   #3
LQ Newbie
Registered: Jun 2004
Location: IL
Posts: 24

Original Poster
Rep: Reputation: 15
anyway do lookup with C functions provided by libpcap or whatever libbrary?
is there a struct to store these information?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find an IP address from the MAC address of a remote machine ? jitz Linux - General 3 01-03-2006 08:55 AM
How to find IP address of a machine if I know their MAC Address dysenteryduke Linux - Networking 13 09-12-2005 11:21 AM
Finding Ip address with Mac address rupeshdwivedi Linux - Networking 6 09-01-2005 08:44 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 05:33 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 11:33 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration