LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-19-2004, 09:34 AM   #1
SeanatIL
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, 10:39 AM   #2
druisgod
Member
 
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.


Druisgod
 
Old 07-19-2004, 10:57 AM   #3
SeanatIL
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?
Thank
 
  


Reply


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 07:55 AM
How to find IP address of a machine if I know their MAC Address dysenteryduke Linux - Networking 13 09-12-2005 10:21 AM
Finding Ip address with Mac address rupeshdwivedi Linux - Networking 6 09-01-2005 07:44 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:23 PM.

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