Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Wink how to check a port is listening in the kernel?

    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!

  2. #2
    Linux Newbie
    Join Date
    Sep 2012
    Nashville, TN
    I am not sure if this helps but I did find some code using netfilter that wanted to do the same thing. Here is the link
    c - Check port number in Linux Kernel Module using Netfilter - Stack Overflow

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts