Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - BPF Question: (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
RE: BPF Question  
Hi:
	We've confirmed that there is indeed a problem and it happens
with the io-net and native drivers but not with BSD drivers.  We'll let
you know when we've got a solution posted.

	Thanks for reporting this to us with a clean test case!
		Robert.

-----Original Message-----
From: A Gagne [mailto:community-noreply@qnx.com] 
Sent: Thursday, November 20, 2008 4:16 PM
To: general-networking
Subject: 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



_______________________________________________
General
http://community.qnx.com/sf/go/post17008
Re: BPF Question  
On Fri, Nov 21, 2008 at 11:25:07AM -0500, Robert Craig wrote:
> Hi:
> 	We've confirmed that there is indeed a problem and it happens
> with the io-net and native drivers but not with BSD drivers.  We'll let
> you know when we've got a solution posted.
> 
> 	Thanks for reporting this to us with a clean test case!
> 		Robert.

Should be fixed now.

-seanb
Re: BPF Question  
How would I get this fix? Is it in the core networking code, or somewhere else?
Re: BPF Question  
On Wed, Nov 26, 2008 at 01:19:13PM -0500, A Gagne wrote:
> How would I get this fix? Is it in the core networking code, or somewhere else?

Yes, I just checked it in.

-seanb
Re: BPF Question  
Hi Sean Boudreau,

      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 (telnet)tried to communicate with the system. You told 
this problem is solved and you checked in the fixed one. Can you please tell me which is the version I should use in 
order to avoid this hanging problem.
Re: BPF Question  
On Tue, Jan 27, 2009 at 05:02:13AM -0500, Beniz VB wrote:
> Hi Sean Boudreau,
> 
>       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 (telnet)tried to communicate with the system. You 
told this problem is solved and you checked in the fixed one. Can you please tell me which is the version I should use 
in order to avoid this hanging problem.

You need svn revision 646 or later from
http://community.qnx.com/svn/repos/core_networking.
If in doubt the trunk should be OK.

-seanb
RE: BPF Question  
We've also checked the change into our 6.4.0 maintenance branch as a
"critical fix" (branches/BC640_2406_release) if you want to pick up a
minimum of changes.

	Robert. 

-----Original Message-----
From: Sean Boudreau [mailto:community-noreply@qnx.com] 
Sent: Tuesday, January 27, 2009 10:44 AM
To: general-networking
Subject: Re: BPF Question

On Tue, Jan 27, 2009 at 05:02:13AM -0500, Beniz VB wrote:
> Hi Sean Boudreau,
> 
>       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 (telnet)tried to communicate
with the system. You told this problem is solved and you checked in the
fixed one. Can you please tell me which is the version I should use in
order to avoid this hanging problem.

You need svn revision 646 or later from
http://community.qnx.com/svn/repos/core_networking.
If in doubt the trunk should be OK.

-seanb

_______________________________________________
General
http://community.qnx.com/sf/go/post20849