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 - Iopkt driver stops reading after six packets: Page 1 of 8 (8 Items)
   
Iopkt driver stops reading after six packets  
I need to write a simple native io-pkt driver. I started with the sample driver code that QNX posted and added a few 
lines of code to display the messages coming in. This seemed to work okay. The data displayed looks correct, but after 
reading six packets, it seems sam_start() stops being called. Do I need to do anything other than m_freem to free the 
mbufs and NW_SIGUNLOCK_P, to let the driver know I am finished with a packet so the driver can keep receiving more? At 
the moment all I want to do is see all the packets. I will worry about what I want to do with them later.

I attached the sample driver code with the changes I made to do this test.

The test was done on a Yosemite evaluation board with a 440EP processor.

I am mounting the driver with 

mount -Tio-pkt devnp-sample.so

and then setting the ip address with

ifconfig sam0 xxx.xxx.xxx.xxx

at which point it displays six packets and stops.

Thanks

A G
Attachment: Compressed file iopkt-sample.zip 8.61 KB