Hi, On Wed, Jul 15, 2020 at 6:13 PM Waldek Kozaczuk <[email protected]> wrote:
> Hi, > > Unfortunately, I have no idea what it would take to add raw sockets > support. Please be aware that we maintain another IPV6 branch - > https://github.com/cloudius-systems/osv/tree/ipv6 - which besides IPV6 > might have better networking support but I doubt it supports raw sockets. > > I am also adding Charles Meyers from Spirent who wrote original IPV6 > support to this thread. He may have some thoughts on this matter. Also, > Spirent has also its own OSv fork - https://github.com/SpirentOrion/osv - > which has extra stuff/fixes to networking stack (I would like to port some > of those to the mainline OSv at some point). > The TCP/IP stack supports raw sockets (it's the FreeBSD stack after all). One potential issue is that the Linux socket() compatibility layer is incorrect. I see that linux_socket() (called by socket() function) has some support for raw sockets: https://github.com/cloudius-systems/osv/blob/master/bsd/sys/compat/linux/linux_socket.cc#L619 However, it's bit picky on the "domain" and "protocol" and will ignore what Frederic attempted to do: fd=socket(AF_PACKET,SOCK_RAW,htons(ETH_P_ALL)); I assume if you fix up linux_socket() to do what Linux does, things will work fine. - Pekka -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/CAGUyND-X9cbtnqMZ5STZoysbPLqOr9LFmCtnbMBjLfT8mDQbog%40mail.gmail.com.
