> There is no difference between SOCK_DGRAM and SOCK_RAW in PF_PACKET.
No, there is large difference between SOCK_RAW and SOCK_DGRAM
for packet socket.
SOCK_DGRAM sends/receive only network payload with
MAC headers stripped/added in the kernel.
SOCK_RAW tries to make best efforts to send/receive true raw data.
Generally, 90% of our drivers are broken and do not give
enough information (or give wrong information) to use SOCK_RAW unambiguously,
so that SOCK_DGRAM should be used always when it is possible.
Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/