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 - Unable to load packet filter lsm: Page 1 of 7 (7 Items)
   
Unable to load packet filter lsm  
I'm trying to compile and load the simple packet filter from documentation (http://www.qnx.com/developers/docs/7.0.0/
index.html#com.qnx.doc.core_networking/topic/filtering_PF.html) 
I use SDP 7.0 and RTOS vm on vmware also 7.0 version.

the code compiles successfully:

qcc -Wl,-E -Vgcc_ntox86 -c -Wp,-MMD,build/x86-release/src/filter_1.d,-MT,build/x86-release/src/filter_1.o -o build/x86-
release/src/filter_1.o -I /home/alexandr/qnx700/target/qnx7/usr/include/io-pkt/ -Wall -fmessage-length=0 -O2 -fPIC  src/
filter_1.c
src/filter_1.c: In function 'deinit_module':
src/filter_1.c:67:16: warning: implicit declaration of function 'pfil_head_get' [-Wimplicit-function-declaration]
     pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET);
                ^
src/filter_1.c:67:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET);
              ^
src/filter_1.c:71:5: warning: implicit declaration of function 'pfil_remove_hook' [-Wimplicit-function-declaration]
     pfil_remove_hook(input_hook, NULL, PFIL_IN | PFIL_WAITOK,
     ^
src/filter_1.c:75:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     pfh_inet = pfil_head_get(PFIL_TYPE_IFNET, 0);
              ^
src/filter_1.c: In function 'pfil_entry':
src/filter_1.c:95:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET);
              ^
src/filter_1.c:99:5: warning: implicit declaration of function 'pfil_add_hook' [-Wimplicit-function-declaration]
     pfil_add_hook(input_hook, NULL, PFIL_IN | PFIL_WAITOK,
     ^
src/filter_1.c:104:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     pfh_inet = pfil_head_get(PFIL_TYPE_IFNET,0);
              ^
qcc -Wl,-E -Vgcc_ntox86 -shared -o build/x86-release/libfilter_1.so   build/x86-release/src/filter_1.o 

but when I try to load my lsm:

# mount -vvv -Tio-pkt /root/lsm-filter.so 
Parsed: mount from [/root/lsm-filter.so] mount on [NULL] type [io-pkt] 
exec: mount_io-pkt -o rw -o implied -o nostat /root/lsm-filter.so /
Using internal mount (mount_io-pkt not found)
Type    [io-pkt] Flags 0x80080000 
Device  [/root/lsm-filter.so] Directory [/] 
Options [NULL] 
mount: Can't mount / (type io-pkt) 
mount: Possible reason: No such device or address

and in slog I can see only such line:

Feb 12 13:48:15.543                    iopkt.81934          main_buffer      0  Unable to load /root/lsm-filter.so: 
(null)

did anybody face such problem? could anybody help me with this?