All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Oester <kernel@linuxace.com>
To: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: /proc and/or /sys file to know if ip_tables is there?
Date: Thu, 28 Nov 2013 08:10:53 -0800	[thread overview]
Message-ID: <20131128161053.GA21908@home> (raw)
In-Reply-To: <52971A7C.7000505@linux.intel.com>

On Thu, Nov 28, 2013 at 12:27:08PM +0200, Tomasz Bursztyka wrote:
> Hi,
> 
> I need to know reliably at runtime whether or not ip_tables is
> either currently loaded as a module or built-in the kernel.
> 
> Testing for /sys/module/ip_tables solves the first issue, but in
> case of built-in it's not usable.
> 
> I could check for ip_tables_* symbols in /proc/kallsyms but I guess
> it's not a nice way.
> 
> Any other proper way?

[ -f /proc/net/ip_tables_names ]

Although built in components will show up in /sys/module/ also.

Phil

  reply	other threads:[~2013-11-28 16:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-28 10:27 /proc and/or /sys file to know if ip_tables is there? Tomasz Bursztyka
2013-11-28 16:10 ` Phil Oester [this message]
2013-11-29  6:01   ` Tomasz Bursztyka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131128161053.GA21908@home \
    --to=kernel@linuxace.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=tomasz.bursztyka@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.