Find the answer to your Linux question:
Results 1 to 2 of 2
Hi 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Posts
    2

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


    Hi
    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!
    Thanks!

  2. #2
    Just Joined!
    Join Date
    Sep 2012
    Location
    Nashville, TN
    Posts
    97
    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
  •