On Fri, 2005-08-12 at 07:52, Talpey, Thomas wrote: > At 11:52 PM 8/11/2005, Tom Duffy wrote: > > > >On Aug 11, 2005, at 2:38 PM, Hal Rosenstock wrote: > >> Can anyone think of another approach to do this and keep backward > >> compatibility ? > > > >Do we need backward compatibility? How about the stuff that includes > >if_packet.h gets rebuilt? You are adding to the end of the struct, > >after all. > > The size of the struct is less of an issue than the test for > ARPHRD_INFINIBAND. David said as much: > > -- it won't work for anything else without adding > -- more special tests to that af_packet.c code > > I have to say, SOCKADDR_COMPAT_LL is pretty stinky too.
SOCKADD_COMPAT_LL is to support backwards compatibility (on binaries built with the old header with only 8 byte sll_addr in sockaddr_ll struct). > Hal, why *are* you testing for ARPHRD_INFINIBAND anyway? > What different action happens in the transport-independent > code in this special case? It is done to preserve length checks that were already there (on struct msghdr in packet_sendmsg and addr_len in packet_bind). I didn't want to weaken that. In packet_sendmsg, the check is that the message is not shorter than the link level header. For bind, the check is that the address length bound to the socket is accurate for the link layer being used. Those parameters come from sendto and bind calls in the application. -- Hal _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
