lkml.org 
[lkml]   [2009]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 19/21] ceph: ioctls
> 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.


\
 
 \ /
  Last update: 2009-10-02 18:39    [W:0.115 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site