On Tue, Jul 28, 2015 at 10:22:47AM -0700, Ben Pfaff wrote: > On Tue, Jul 28, 2015 at 09:48:56AM -0300, Thadeu Lima de Souza Cascardo wrote: > > On Mon, Jul 27, 2015 at 03:46:28PM -0700, Ben Pfaff wrote: > > > On Mon, Jul 27, 2015 at 02:24:19PM -0300, Thadeu Lima de Souza Cascardo > > > wrote: > > > > When devices are created, they are announced using RTM_IFANNOUNCE > > > > messages using > > > > PF_ROUTE. > > > > > > > > Signed-off-by: Thadeu Lima de Souza Cascardo <casca...@redhat.com> > > > > > > Do you know anyone who might be qualified to properly review this? It > > > seems reasonable but I don't know this part of BSD at all. > > > > Maybe one of the guys who contributed some of the specific BSD code: > > > > Ed Maste <ema...@freebsd.org> contributed lib/route-table-bsd.c, and > > Giuseppe Lettieri <g.letti...@iet.unipi.it> contributed lib/rtbsd.c. > > > > I am cc'ing them on this message, and bouncing the patch to them as well. > > > > What about the style? Is it OK to read using struct if_msghdr, then cast to > > struct if_announcemsghdr? From my tests, this works fine, the RAW socket > > seems > > to work like a DGRAM socket in this particular case. > > Doesn't the compiler complain about that without a cast?
Good point. I thought there was a cast already there. Fixed. I was pointing out to the assumption that one message is larger than the other. I don't think this is a problem in this particular case. if_msghdr has a struct at the end, which stores a lot of stats, and all the other earlier members of both if_msghdr and if_announcemsghdr are of types that don't have different sizes on different supported architectures, AFAIK. I know almost nothing about *BSD. Cascardo. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev