Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - BPF Question: Page 1 of 8 (8 Items)
   
BPF Question  
I am trying to use BPF to read and write raw packets to the network using io-pkt in QNX 6.4.0. The program I wrote 
appeared to work fine, but would hang whenever anything else tried to communicate with the board where it was running. 
In an attempt to track down the problem, I created a separate test program that simply opens BPF, binds it to the 
network adapter, and reads packets from it. Even this test program hangs under the same conditions.

I can connect to and communicate with the device with an ftp or telnet client, without any issues, as long as the test 
program is not running. The test program runs fine as long as nothing else is talking directly to the device, like an 
ftp or telnet client. If the program is running and I try to connect to the device with anything else that uses the 
network, such as an ftp client or a telnet client, io-pkt hangs.

364560   1 /boot/io-pkt-v6-hc  21r SIGWAITINFO                             
364560   2 /boot/io-pkt-v6-hc  21r MUTEX       (0x481732c0) 364560-02 #0   
364560   3 /boot/io-pkt-v6-hc  21r RECEIVE     16                          
364560   4 /boot/io-pkt-v6-hc  21r RECEIVE     20    

I tried it with both io-pkt-v4-hc and io-pkt-v6-hc with the same results. Attached are the test program, the pidin 
results after a failure, and the output of the program to the point of failure.

Any insight is greatly appreciated.

A G

Attachment: Compressed file bpftest.zip 2.02 KB