Thread (9 messages) 9 messages, 3 authors, 2005-04-01

Re: af_packet.c bug?

From: Ben Greear <hidden>
Date: 2005-03-28 20:33:41

Thomas Graf wrote:
* Ben Greear [ref] 2005-03-28 12:08
quoted
quoted
Seems so, please adopt the size of spkt_device in struct sockaddr_pkt
you mean adapt maybe?

Of course, stupid typo. ;->
quoted
I was also wondering why we couldn't hold a reference to the net-device
instead of just it's ifindex when dealing with a bound raw socket.

Saving a netdevice handle in the packet socket is not a problem but
doing the same for the packet socket address seems to be non trivial.
Yes.  But assuming you bind the socket, you use the device saved in the packet
socket.  If you are sending to a particular device for each send(), then you'll
just have to pay the lookup costs.  I haven't looked recently, but didn't someone
finally hash the device lookup so that it's not a linear walk of the device
list now?

Ben



-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help