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
Subject: Re: mask for interface
Date: Tue, 30 Mar 2004 11:32:41 +0300	[thread overview]
Message-ID: <406930A9.5070908@aiqa.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0403270155130.11373-100000@filer.marasystems.com>

Finally I understand it !

iptables -A test -i eth+ -j ACCEPT
iptables -A test -i eth0 -j ACCEPT
iptables -A test -i eth0+ -j ACCEPT
iptables -A test -i + -j ACCEPT
iptables -A test -i e+ -j ACCEPT

output of a test program is

iface : eth+, Mask is :FF,FF,FF
iface : eth0, Mask is :FF,FF,FF,FF,FF
iface : eth0+, Mask is :FF,FF,FF,FF
iface : +, Mask is :
iface : e+, Mask is :FF


-------test function to print mask value------
static void printMask(unsigned char *mask)
{
    printf("Mask is :");

    while (*mask != '\0') {
        printf("%X%s", *mask, *(mask+1) != '\0' ? "," : "\n");
        ++mask;
    }
}
-----------------------------------------------------



Thanks for your help...

Ozgur AKAN

>Again, it is used for the + wildcard.
>
>In theory it could be used for other things as well, but only the + 
>wildcard is implemented in the iptables application.
>
>Regards
>Henrik
>
>
>
>  
>

      reply	other threads:[~2004-03-30  8:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25  8:56 mask for interface Ozgur AKAN
2004-03-25 11:46 ` Henrik Nordstrom
2004-03-25 12:09   ` Ozgur AKAN
2004-03-26 14:40 ` Ozgur AKAN
2004-03-27  0:56   ` Henrik Nordstrom
2004-03-30  8:32     ` 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=406930A9.5070908@aiqa.com \
    --to=akan@aiqa.com \
    --cc=hno@marasystems.com \
    --cc=netfilter-devel@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 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.