Re: [PATCH 19/21] ceph: ioctls

Andi Kleen
2009-10-02T16:36:20Z

> Yes. I suspect an explicit
>
> struct in6_addr osd_addr;
> __be16 osd_port;
>
> makes more sense. Then legacy IPv4 addresses can just be represented as
> ::ffff:1.2.3.4. That seems like the simplest route?

You would need to decide internally then if you want to use
the ipv6 socket API (requiring ipv6 to be loaded) or map
manually. Using af_family might be cleaner.

>
> I should similarly update the struct ceph_entity_addr as well (it also
> embeds a sockaddr_in). And/or embed that struct here.

You could also use struct sockaddr_storage, it's designed to contain arbitary
address types (basically it has a lot of padding)

Trap: if you ever copy it out you have to make sure to not leak
kernel memory in the padding of course.

-Andi

--
ak@linux.intel.com -- Speaking for myself only.