Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - I want to send the data link layer packets: (2 Items)
   
I want to send the data link layer packets  
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?
Re: I want to 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.