public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] Implement DAT for IPv6
@ 2013-03-01 10:59 Mihail Costea
  2013-03-01 11:08 ` Antonio Quartulli
  2013-03-01 11:11 ` Antonio Quartulli
  0 siblings, 2 replies; 12+ messages in thread
From: Mihail Costea @ 2013-03-01 10:59 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hi,

I've started implementing DAT for IPv6 and I have a few questions
regarding the design.
I've already implemented a snooping mechanism for Network Solicitation
package, but now I have to add it to the ipv6 distributed table.
I'm also a beginner in kernel programming so any help would be useful.

From what I've seen there is a lot of code in distributed-arp-table.c
that could be used for ipv6 distributed table.
A problem in using that code, from what I've seen, is the fact that
<struct batadv_dat_entry > has a field for ip with only 32 bits
(__be32).

So I was thinking to make it more general by:
1. transforming that into a pointer (unsigned char *ip) and add a
field size which will represent the total size of the ip.
The ip itself would be allocated dynamically.
2. use a union with both _be32 / struct in6_addr. In this case the
problem is that if we use ipv4 then all the other space for struct
in6_addr would be wasted.

The second problem from what I've seen in the code is that the
batadv_priv->dat field is hardcoded.
For ipv6 we would need a new field to memorize the table, but I don't
think it's a really hard problem to solve in order to make it general.

This solution would be to avoid code duplicate. Off course, I could
still write all the code in parallel just for IPv6, but I think that a
common base would be useful.

Thanks,
Mihail

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

end of thread, other threads:[~2013-03-08 10:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01 10:59 [B.A.T.M.A.N.] Implement DAT for IPv6 Mihail Costea
2013-03-01 11:08 ` Antonio Quartulli
2013-03-01 11:38   ` Mihail Costea
2013-03-01 11:43     ` Antonio Quartulli
2013-03-01 11:56       ` Mihail Costea
2013-03-08  9:22         ` Mihail Costea
2013-03-08  9:33           ` Antonio Quartulli
2013-03-08 10:11             ` Mihail Costea
2013-03-08 10:14               ` Antonio Quartulli
2013-03-01 11:11 ` Antonio Quartulli
2013-03-01 11:41   ` Mihail Costea
2013-03-01 11:48     ` Antonio Quartulli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox