Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Does shim driver work with Filter/converter module?: (3 Items)
   
Does shim driver work with Filter/converter module?  
Hello,
        I want to know if the shim driver which is used for backward compatibility to use with io-net NIC driver from 
QNX6.4 under io-pkt, is workable even for the filter/converter module. 

I am porting the filter module from io-net to io-pkt. If this shim driver works for filter/converter module then I can 
try using the shim driver.

I have browsed through the forum and internet for porting related info but was able to find an example of using the pfil
 hook to access mbuf  at

http://www.qnx.com/developers/docs/6.4.1/io-pkt_en/user_guide/migrating.html

Can anyone please give me some more input on using mbuf so that I can straight away convert to iov type or point me to 
some example in BSD implementation, which at least reduces my effort in understanding.

Regards
Vinod
Re: Does shim driver work with Filter/converter module?  
Hi Vinod:
   The shim layer only provides compatibility for the driver interface.  The filter / converter interface is in the 
stack, so the shim layer won't do anything for you.  There's more information on io-pkt filters located here:

http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Filtering_wiki_page

And a good (if complicated) example is here:
http://community.qnx.com/integration/viewvc/viewvc.cgi/trunk/lib/io-pkt/sys/lsm/nraw/?root=core_networking&system=
exsy1001

You can also look at how mbufs and npkts are converted by taking a look in the shim layer here:
http://community.qnx.com/integration/viewvc/viewvc.cgi/trunk/lib/io-pkt/sys/dev_qnx/shim/io-net.c?revision=1&root=
core_networking&system=exsy1001&view=markup

(look for npkt2mbuf and mbuf2npkt).

Still a large learning curve, but I hope this helps,
    Robert.



Re: Does shim driver work with Filter/converter module?  
Thanks Robert.

I have one more question. In my posting I have included a link of the sample code (example of adding a hook and removing
 a hook and the entry function etc.)  for io-pkt. This code when compiled gives me errors for all the pfil calls, like 
pfil_get_get(), pfil_add_hook(), pfil_remove_hook() etc. Do I have to include any library. I am building this on QNX6.4.
0. I have all the header files needed for io-pkt.

I get an error saying the above pfil calls "was not declared in this scope". 

Can you please let me know if I have to include any libs 

Thanks
Vinod