Raw Sockets: Two Questions

Ronald F. Guilmette rfg at tristatelogic.com
Tue Mar 20 20:09:02 UTC 2018


I'm going to be doing some stuff with raw sockets pretty soon, and
while scrounging around, looking for some nice coding examples, I
found the following very curious comment on one particular message
board:

    https://stackoverflow.com/questions/7048448/raw-sockets-on-bsd-operating-systems

      "Using raw sockets isn't hard but it's not entirely portable. For
      instance, both in BSD and in Linux you can send whatever you want,
      but in BSD you can't receive anything that has a handler (like TCP
      and UDP)."

So, first question:  Is the above comment actually true & accurate?

Second question:  If the above assertion is actually true, then how can
nmap manage to work so well on FreeBSD, despite what would appear to be
this insurmountable stumbling block (of not being able to receive replies)?


More information about the freebsd-net mailing list