[GE dev] IPv6 commlib

igardais igardais at yahoo.fr
Mon Mar 30 16:58:58 BST 2009

    [ The following text is in the "utf-8" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Well, in cl_tcp_framework.c,  cl_com_tcp_private_t could get the following modifications :
- addition of an 'int sock6fd' to handle the IPv6-only socket
- change client_addr to either a 'sockaddr_storage' or an 'addrinfo'

If using addrinfo induces getaddrinfo() calls.
Logic should be added into cl_com_tcp_open_connection() for socket() calls.

Also in cl_communication.c :
- cl_com_gethostbyaddr() uses in_addr. Should be changed to use addrinfo.
- cl_com_is_ip_address_string() is IPv4 centric (so does cl_com_get_ip_string())

Globally speaking, IPv6 can be handle by switchs inside the functions to tell whether sockaddr_storage should be cast to sockaddr_in or sockadd_in6.
For functions taking an in_addr as a parameter should be either duplicate to user in6_addr or modified to use addrinfo.

I hope I'm clear enough to be understood :)


--- En date de : Lun 30.3.09, rayson <rayrayson at gmail.com> a écrit :

> De: rayson <rayrayson at gmail.com>
> Objet: Re: [GE dev] IPv6 commlib
> ?: dev at gridengine.sunsource.net
> Cc: "igardais" <ionel.gardais at tech-advantage.com>
> Date: Lundi 30 Mars 2009, 16h49
> On 3/22/09, igardais
> <ionel.gardais at tech-advantage.com> wrote:
> > As Christian says, adding #ifdef statements is not an
> option.
> > But IPv6 needs special/additionnal/new calls
> (dedicated to IPv6 or not). Which way should we considere in
> adding IPv6 support to commlib ?
> > Create an IPv6 only commlib beside the original
> commlib ?
> > Modify structures to handle IPv4 and IPv6 datas ?
> > Duplicate structures and add logic to current methods
> ?
> Can you provide a real example??
> We should be able to typedef & #define function names
> to make the code
> as #ifdef as possible.
> Rayson


To unsubscribe from this discussion, e-mail: [dev-unsubscribe at gridengine.sunsource.net].

More information about the gridengine-users mailing list