Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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....
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.
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...
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....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.