Re: raw PF_PACKET protocol selection

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Joakim Tjernlund <joakim.tjernlund@...>
Cc: 'Herbert Xu' <herbert@...>, <netdev@...>
Date: Tuesday, October 9, 2007 - 4:17 am

On Tue, Oct 09, 2007 at 09:51:25AM +0200, Joakim Tjernlund (joakim.tjernlund@transmode.se) wrote:

I received 1396 bytes of logs before terminated, which is 27 ARP packets, 
so there is quite big number of packet there. 
Your application works correctly (although you swapped source and
destination ethernet fields) - buffered writing is not a bug,
if you do not like it, use write(2), mmap(2) or turn buffering off as
Herbert suggested. To get packets with your own ethernet protocol number
you have to change eth_type_trans() function in kernel, which parses
ethernet header and returns protocol number, under some conditions it
will just return your number automatically, but you should check it.

-- 
	Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
raw PF_PACKET protocol selection, Joakim Tjernlund, (Mon Oct 8, 2:36 pm)
Re: raw PF_PACKET protocol selection, Herbert Xu, (Mon Oct 8, 11:17 pm)
RE: raw PF_PACKET protocol selection, Joakim Tjernlund, (Tue Oct 9, 2:08 am)
Re: raw PF_PACKET protocol selection, Evgeniy Polyakov, (Tue Oct 9, 3:13 am)
Re: raw PF_PACKET protocol selection, Joakim Tjernlund, (Tue Oct 9, 3:27 am)
Re: raw PF_PACKET protocol selection, Herbert Xu, (Tue Oct 9, 3:56 am)
Re: raw PF_PACKET protocol selection, Evgeniy Polyakov, (Tue Oct 9, 3:34 am)
Re: raw PF_PACKET protocol selection, Joakim Tjernlund, (Tue Oct 9, 3:51 am)
Re: raw PF_PACKET protocol selection, Evgeniy Polyakov, (Tue Oct 9, 4:17 am)
Re: raw PF_PACKET protocol selection, Joakim Tjernlund, (Tue Oct 9, 5:00 am)