I am using Android 4.2 which the kernel is 3.0. So I post my question here.
And I want to know how can I get the status of a port in the kernel (I am writing a netfilter kernel module which need to know whether a local proxy is running or not). I know this can be achieve by checking the return value of creating a new socket. But this is too expensive for the socket created is useless.
Any help would be appreciated!