* l3num is u_int16_t
@ 2005-12-19 18:13 Pablo Neira Ayuso
2005-12-20 5:25 ` Yasuyuki KOZAKAI
0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2005-12-19 18:13 UTC (permalink / raw)
To: Yasuyuki Kozakai; +Cc: Netfilter Development Mailinglist
Hi Yasuyuki,
/* The manipulable part of the tuple. */
struct nf_conntrack_man
{
union nf_conntrack_man_l3proto u3;
union nf_conntrack_man_proto u;
/* Layer 3 protocol */
u_int16_t l3num;
};
struct nfgenmsg {
u_int8_t nfgen_family; /* AF_xxx */
u_int8_t version; /* nfnetlink version */
u_int16_t res_id; /* resource id */
} __attribute__ ((packed));
There's some inconsistency here: why l3num is u_int16_t but nfgen_family
in u_int8_t? AFAIK, both designates the same thing, the layer 3 protocol
number.
--
Pablo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: l3num is u_int16_t
2005-12-19 18:13 l3num is u_int16_t Pablo Neira Ayuso
@ 2005-12-20 5:25 ` Yasuyuki KOZAKAI
0 siblings, 0 replies; 2+ messages in thread
From: Yasuyuki KOZAKAI @ 2005-12-20 5:25 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, yasuyuki.kozakai
From: Pablo Neira Ayuso <pablo@eurodev.net>
Date: Mon, 19 Dec 2005 19:13:29 +0100
> Hi Yasuyuki,
>
> /* The manipulable part of the tuple. */
> struct nf_conntrack_man
> {
> union nf_conntrack_man_l3proto u3;
> union nf_conntrack_man_proto u;
> /* Layer 3 protocol */
> u_int16_t l3num;
> };
>
> struct nfgenmsg {
> u_int8_t nfgen_family; /* AF_xxx */
> u_int8_t version; /* nfnetlink version */
> u_int16_t res_id; /* resource id */
> } __attribute__ ((packed));
>
> There's some inconsistency here: why l3num is u_int16_t but nfgen_family
> in u_int8_t? AFAIK, both designates the same thing, the layer 3 protocol
> number.
I just copied protonum, in old nf_conntrack ;)
I think we can change it to u_int8_t because this definition is for only
kernel. The my remaind concern is alignment. Is there any reason
that we need to add "u_int8_t pad" after l3num ?
-- Yasuyuki Kozakai
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-20 5:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-19 18:13 l3num is u_int16_t Pablo Neira Ayuso
2005-12-20 5:25 ` Yasuyuki KOZAKAI
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.