All of lore.kernel.org
 help / color / mirror / Atom feed
* iptables_target and unknown size data.
@ 2003-11-26 10:05 Emmanuel Guiton
  2003-11-26 10:18 ` Henrik Nordstrom
  0 siblings, 1 reply; 2+ messages in thread
From: Emmanuel Guiton @ 2003-11-26 10:05 UTC (permalink / raw)
  To: netfilter-devel

Hei!

I am writing an iptables extension. It's a new target. My problem is 
that I need to use a linked list whose size is unknown when registering 
the target. As I am not very familiar with the alignment problems, I am 
wondering if it can cause any trouble?

To be a bit more concrete, is the following ok?

struct ipt_sd_host
{
    struct in_addr    address;
    int                port;            
    struct ipt_sd_host    *next_host;
};

struct ip_new_targ_data
{
    struct ipt_sd_host   *host_list;
    int                            min_port;
    int                            max_port;
};

static
struct iptables_target my_new_target
= { NULL,
    "NEWTARG",
    IPTABLES_VERSION,
    IPT_ALIGN(sizeof(struct ip_new_targ_data)),
    IPT_ALIGN(sizeof(struct ip_new_targ_data)),
    &help,
    &init,
    &parse,
    &final_check,
    &print,
    &save,
    opts
};


                 Emmanuel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-26 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-26 10:05 iptables_target and unknown size data Emmanuel Guiton
2003-11-26 10:18 ` Henrik Nordstrom

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.