LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2009, 03:38 AM   #1
iamjayanth
Member
 
Registered: Oct 2008
Posts: 51

Rep: Reputation: 15
Do linux have a device file for ETHERNET CARD.


Sir,

Do linux have device file for ethernet card. Can I use open , read , write , system calls to read data transferred through LAN. Is there any methods to read network datas (with out header and tailor information).
Hope anyone can help me out. Thanking you....

Jayanth.S
 
Old 04-04-2009, 12:30 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,343

Rep: Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906
Quote:
Originally Posted by iamjayanth View Post
Sir,
Do linux have device file for ethernet card. Can I use open , read , write , system calls to read data transferred through LAN. Is there any methods to read network datas (with out header and tailor information).
Hope anyone can help me out. Thanking you....
First, not everyone here is a "Sir".

Second, what "linux" are you using? And what programming language are you writing your program in? What are you trying to accomplish? There's lots of methods to get network stats, depending on if you're using C code, Perl, Bash, or built-in utilities.

With a very vague question, we can't really give you a good answer.
 
Old 04-04-2009, 06:44 PM   #3
gamax92
LQ Newbie
 
Registered: Apr 2009
Posts: 15

Rep: Reputation: 1
Exclamation

I do know that Fedora 10 ethernet device is /dev/eth(x)

and ethtool is some type of configure tool for Ethernet cards

it may say what the device is for your system

* Note (x) means a number
 
Old 04-06-2009, 01:30 AM   #4
iamjayanth
Member
 
Registered: Oct 2008
Posts: 51

Original Poster
Rep: Reputation: 15
Hi,

I am not addressing you sir again,TBOne.... I am using CentoS 5 on a 2.6.18 kernel. I am using C programming language . My requirement is to read network traffic as datas not as packets(without header and tailor information)..Is there any way to do it...


Plus I dont have a /dev/eth(x) collection of device file..Thanking again for your reply...

Jayanth.S
 
Old 04-06-2009, 12:33 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,343

Rep: Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906Reputation: 3906
Quote:
Originally Posted by iamjayanth View Post
Hi,

I am not addressing you sir again,TBOne.... I am using CentoS 5 on a 2.6.18 kernel. I am using C programming language . My requirement is to read network traffic as datas not as packets(without header and tailor information)..Is there any way to do it...

Plus I dont have a /dev/eth(x) collection of device file..Thanking again for your reply...
Even though you're not addressing me (guess you got upset when someone asked you for actual information...), I'll answer, since the information is for the whole community, not just you.

You may or may not have an ethxxx device. It could be wlanxx, eth_sx_xx, or some other name, depending on the device.

If you want C code examples, check out the source code for WireShark. It already has decode/capture stuff built into it, and in C....
 
  


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
Graphic card device file? fhleung Linux - Hardware 4 03-21-2006 07:32 PM
Slackware thinks USB Card Reader is an Ethernet device apachedude Linux - Hardware 3 02-04-2005 08:59 AM
How to determine PTY device of ethernet card The MCP Linux - Networking 1 08-17-2004 01:36 AM
Ethernet card on laptop: I installed my D-Link ethernet card into Redhat 9, not detec brighamr Linux - Hardware 0 05-18-2004 01:33 AM
iPAQ 10/100 fast Ethernet PCI card device driver philipsyyy Linux - Hardware 4 10-07-2002 06:32 PM


All times are GMT -5. The time now is 11:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration