netfilter-nfqueue-samples
netfilter-nfqueue-samples copied to clipboard
Difference in output result for the code sample-helloworld
Why the difference in output result for the same code ?
on actual AMD Ubuntu PC platform :
dell@dell-hpc:~/Downloads/netfilter-nfqueue-samples$ ./sample-helloworld
opening library handle
unbinding existing nf_queue handler for AF_INET (if any)
error during nfq_unbind_pf()
dell@dell-hpc:~/Downloads/netfilter-nfqueue-samples$
on QEMU ARM emulation platform :
# mv /mnt/host/sample-helloworld /home/qemu/
# cd home/qemu/
# ./sample-helloworld
opening library handle
error during nfq_open()
#
So, I test whether the socket is occupied as follows:
on actual AMD Ubuntu PC platform :
dell@dell-hpc:~/Downloads/netfilter-nfqueue-samples$ lsof -i -P -n | grep LISTEN
PM2\x20v4 2751 rog 16u IPv4 43760 0t0 TCP 127.0.0.1:8081 (LISTEN)
soc_term 19017 rog 3u IPv4 228170 0t0 TCP *:54321 (LISTEN)
soc_term 19018 rog 3u IPv4 232923 0t0 TCP *:54320 (LISTEN)
qemu-syst 19021 rog 14u IPv4 232938 0t0 TCP *:1234 (LISTEN)
qemu-syst 19021 rog 15u IPv6 232939 0t0 TCP *:1234 (LISTEN)
dell@dell-hpc:~/Downloads/netfilter-nfqueue-samples$
no output on QEMU ARM emulation platform