LinuxQuestions.org
Help answer threads with 0 replies.
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 12-17-2002, 06:57 PM   #1
sabby
LQ Newbie
 
Registered: Dec 2002
Posts: 3

Rep: Reputation: 0
program to communicate directly with ethernet


hi all

i need to write a program in C which communicated directly with the ethernet layer. it recieves packets from the ethernet layer, checks there headers, and based upon header information send it to the appropriate application running above it. is it possible to do such a thing?
can we communicate directly with the ethernet layer and bypass the other protocol layers?

sabby
 
Old 12-17-2002, 09:43 PM   #2
no2nt
Member
 
Registered: Aug 2001
Location: South Carolina, USA
Distribution: Redhat 8.0/Custom
Posts: 96

Rep: Reputation: 16
You might want to look at libpcap and winpcap (depending on platform) libraries. I've used them in sniffer and custom protocol apps.
 
Old 12-18-2002, 04:31 AM   #3
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
If you don't want to use the library you might want to look at PF_PACKET. 'man 7 packet' for more info.
 
Old 12-18-2002, 11:36 AM   #4
sabby
LQ Newbie
 
Registered: Dec 2002
Posts: 3

Original Poster
Rep: Reputation: 0
thanks guys

i will look over your suggestions. help me out more if u get more ideas

thanks

sabby
 
Old 12-18-2002, 11:37 AM   #5
sabby
LQ Newbie
 
Registered: Dec 2002
Posts: 3

Original Poster
Rep: Reputation: 0
i should mention that i plan to do it in linux
 
  


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
Get an IP, but still can't communicate with network... bthornton Linux - Networking 21 03-21-2005 07:16 AM
calling a system function directly from C program appas Programming 8 08-03-2004 01:50 AM
My C Chat Program is unable to communicate. mcp_achindra Programming 1 03-20-2004 10:04 AM
communicate via serial... how-to? adam_boz Linux - Newbie 4 10-22-2002 10:30 AM
Cannot communicate outside my network Milkman00 Linux - Networking 24 09-26-2002 01:21 PM

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

All times are GMT -5. The time now is 12:47 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