LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-11-2006, 04:04 AM   #1
caltiger
LQ Newbie
 
Registered: Sep 2006
Posts: 1

Rep: Reputation: 0
MAC n IP


hi,
using ifconfig i can get the MAC and the IP address of the machine.. i was wondering if there was some command or call to access the same using raw sockets..
However, i try i only saw sofcket commands to get the IP from an incoming socket, but nothing abt the MAC.. is there anything i am missing..??

Thanks.
 
Old 09-12-2006, 12:17 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Yes, sockets are at a level that is ignorant of physical/datalink level parameters. It is not necessary for there to even be a link level MAC for TPC/IP to work. ifconfig is a tool that has knowledge of both layers. ARP is also at or near that level. Perhaps there is a system call to get ARPish information.

--- rod.
 
  


Reply



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
Mac fans! A few questions about an old Mac... Mega Man X General 11 01-03-2007 09:01 PM
Need install Fedora 5 on mac with Mac OS X Pangumyth Fedora - Installation 1 03-28-2006 04:35 AM
Mac vs. PC nenyo General 25 09-20-2005 10:47 AM
how to use iptables -m mac --mac-source DeployedOne Linux - Security 3 08-06-2004 03:03 AM
RH 9 and Mac OS X: Is it possible? izibo Linux - Networking 2 07-11-2003 07:05 AM

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

All times are GMT -5. The time now is 03:14 AM.

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