From: KARIM SATTAR <karimas@kfupm.edu.sa>
To: netfilter@lists.netfilter.org
Subject: Initialization of local variable in a iptables datastructure
Date: Fri, 07 Sep 2007 05:50:13 +0300 (AST) [thread overview]
Message-ID: <1253262.1189133413006.JavaMail.karimas@kfupm.edu.sa> (raw)
Hi
I have introduced a variable in xt_counters data structure of type
uint_64t to be used as a counter in ipt_entry data structure. I have
installed iptable new version source code from its website. In this
userspace, I am printing the variable with other packet and byte
counters. Till now iptables are working fine and every thing is all
right -- except with the problem that the variable which I introduced
is showing garbage values mostly 0's ( when print several times with
iptables -L command). I have initialized the variable on the location
where its required but I am not getting a constant value which is in my
case should be only 0 (during testing). Can any one puts a light on
this. I didnt know what the Linux kernel might do if its encounter an
uninitialized variable.
Also since I am printing the counters with the help of iptables-save -c
and iptables -L -n -v and in both cases I am getting this non-obvious
results; there fore I had also tried with initiailizing the variable in
ipt_do_table function under the do_while loop and make the variable
initialized always to 0, but this also not useful as I am still viewing
the same results.
Regards
Karim Asif Sattar
reply other threads:[~2007-09-07 2:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1253262.1189133413006.JavaMail.karimas@kfupm.edu.sa \
--to=karimas@kfupm.edu.sa \
--cc=netfilter@lists.netfilter.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox