Hi,I want to write an application to run under QNX version 6.5.That application need to send the data link layer packets.I can't find socket (PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)) .I had used PF_LINK instead,but it can't work.How can I send the data link layer packets?
You can't send raw Ethernet frames via a socket interface in QNX, only raw IP packets. To send raw Ethernet frames the easiest and best documented method is to use the BPF interface. If a higher performance is required it is possible to write a custom lsm or use lsm-nraw.so, but these are more complicated and should only be considered if BPF doesn't provide what you need.