lkml.org 
[lkml]   [1996]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectSOCK_PACKET: ETH_P_ALL vs. ETH_P_IP
Date

hi

suppose I open a socket with:

s=socket(AF_INET, SOCK_PACKET, htons(ETH_P_ALL));

then I'll get all packets sent and received from/to the machine a program
using this call is running. however, when one does:

s=socket(AF_INET, SOCK_PACKET, htons(ETH_P_IP));

only those packets *sent* to the machine are put into the program.
a packet, that is generated on the local machine and is sent out onto
the the network will not be put into this socket.

is this the correct behaviour ? I thought that ETH_P_IP means "all
IP packets ?" regardless of source/destination.

NB: it's not neccessary to put the IF into promisc. mode.

/herp
herp@wildsau.idv.uni-linz.ac.at



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.043 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site