All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ozgur AKAN <akan@aiqa.com>
To: Henrik Nordstrom <hno@marasystems.com>
Cc: netfilter-devel@lists.netfilter.org,  pangy2004@yahoo.com
Subject: Re: size of a rule
Date: Tue, 27 Apr 2004 11:41:30 +0300	[thread overview]
Message-ID: <408E1CBA.5010007@aiqa.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0404261609030.6443-100000@filer.marasystems.com>




Henrik Nordstrom wrote:

>
>ipt_entry->next_offset gives the size of this rule from what I can 
>understand.
>
>Regards
>Henrik
>
I solved my problem. Here is the sample which gets the name of target. 
It may be useful for other beginners.

Thank you for your help.

-------------------------------------------------
//print ipt_entry_target
struct ipt_entry_target *
get_target(const struct ipt_entry *e)
{
    return (void *)e + e->target_offset;
}

//print ipt_entry_target.name
static void print_target_name(const struct ipt_entry *e)
{
    struct ipt_entry_target *t = get_target(e);
    printf("Target name : %s\n", t->u.user.name);
}
------------------------------------------------------

-- 
Ozgur Akan

      reply	other threads:[~2004-04-27  8:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26 13:54 size of a rule Ozgur AKAN
2004-04-26 14:08 ` Ozgur AKAN
2004-04-26 14:12 ` zhi wang
2004-04-26 14:24 ` Henrik Nordstrom
2004-04-27  8:41   ` Ozgur AKAN [this message]

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=408E1CBA.5010007@aiqa.com \
    --to=akan@aiqa.com \
    --cc=hno@marasystems.com \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=pangy2004@yahoo.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.