Networking Forums

Networking Forums > Computer Networking > Linux Networking > Reading outbound packets to datalink layer using C sockets API - how?

Reply
Thread Tools Display Modes

Reading outbound packets to datalink layer using C sockets API - how?

 
 
boltar2003@yahoo.co.uk
Guest
Posts: n/a

 
      08-01-2004, 05:13 PM
Hi

I've recently written a packet dump program that logs all the inbound packets
to my server using a socket created using the following call:

socket(PF_PACKET,SOCK_DGRAM,htons(ETH_P_IP))

This works fine but my problem is that this socket only receives packets
coming inbound from outside the system. What I need is to read ALL packets
coming in and going OUT. Is there a way to do this using the standard sockets
API or would it involve getting into the kernel code?

Thanks in advance for any help (please reply to newsgroup , not email address)

B2003
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading packets into a buffer lancer6238@yahoo.com Linux Networking 4 03-28-2011 04:23 PM
PROTOCOL sending layer 2 packets.. from a os other than linux.. !!! siva.ieee@gmail.com Linux Networking 1 09-27-2007 02:27 PM
Packets outbound errors Arthus Lim Windows Networking 1 08-24-2005 04:57 AM
Reading raw packets from a wireless card in Linux (kernel 2.6.4) Hemant Mohapatra Linux Networking 0 06-09-2005 01:21 AM
raw sockets for a layer 2 protocol implementation? Edu Linux Networking 0 06-06-2005 10:43 AM



1 2 3 4 5 6 7 8 9 10 11